Fix latest gevent compatibility

This commit is contained in:
shortcutme 2020-06-18 17:22:45 +02:00
parent 79d26060b3
commit ea6016d004
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -1,5 +1,6 @@
import threading import threading
import time import time
import queue
import gevent import gevent
import gevent.monkey import gevent.monkey
@ -121,7 +122,7 @@ class Event:
# Execute function calls in main loop from other threads # Execute function calls in main loop from other threads
class MainLoopCaller(): class MainLoopCaller():
def __init__(self): def __init__(self):
self.queue_call = gevent._threading.Queue() self.queue_call = queue.Queue()
self.pool = gevent.threadpool.ThreadPool(1) self.pool = gevent.threadpool.ThreadPool(1)
self.num_direct = 0 self.num_direct = 0