queue availability check
This commit is contained in:
parent
fcb562e6df
commit
5046360a1d
@ -9,7 +9,7 @@ from importlib import util
|
|||||||
threading_spec = util.find_spec("threading")
|
threading_spec = util.find_spec("threading")
|
||||||
queue_spec = util.find_spec("queue")
|
queue_spec = util.find_spec("queue")
|
||||||
|
|
||||||
if threading_spec is not None:
|
if threading_spec is not None and queue_spec is not None:
|
||||||
import threading
|
import threading
|
||||||
import queue
|
import queue
|
||||||
NUM_THREADS = 10
|
NUM_THREADS = 10
|
||||||
|
@ -8,7 +8,7 @@ from importlib import util
|
|||||||
threading_spec = util.find_spec("threading")
|
threading_spec = util.find_spec("threading")
|
||||||
queue_spec = util.find_spec("queue")
|
queue_spec = util.find_spec("queue")
|
||||||
|
|
||||||
if threading_spec is not None:
|
if threading_spec is not None and queue_spec is not None:
|
||||||
import threading
|
import threading
|
||||||
import queue
|
import queue
|
||||||
NUM_THREADS = 10
|
NUM_THREADS = 10
|
||||||
|
Loading…
Reference in New Issue
Block a user