Switched file IO to greenlet
This commit is contained in:
parent
2305a562d9
commit
0edb696c99
1 changed files with 1 additions and 2 deletions
|
|
@ -12,7 +12,6 @@ import atexit
|
||||||
|
|
||||||
from gevent.fileobject import FileObjectThread
|
from gevent.fileobject import FileObjectThread
|
||||||
import gevent
|
import gevent
|
||||||
import threading
|
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
|
@ -172,7 +171,7 @@ class CaptureObject(object):
|
||||||
|
|
||||||
def flush(self):
|
def flush(self):
|
||||||
logging.debug(f"Flushing {self.file}")
|
logging.debug(f"Flushing {self.file}")
|
||||||
gevent.get_hub().threadpool.spawn(self._stream_to_file)
|
gevent.spawn(self._stream_to_file)
|
||||||
logging.debug(f"Returning flushing {self.file}")
|
logging.debug(f"Returning flushing {self.file}")
|
||||||
|
|
||||||
def open(self, mode):
|
def open(self, mode):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue