Show More
@@ -307,7 +307,7 b' class abstractvfs(object):' | |||||
307 | # multiple instances puts us at risk of running out of file descriptors |
|
307 | # multiple instances puts us at risk of running out of file descriptors | |
308 | # only allow to use backgroundfilecloser when in main thread. |
|
308 | # only allow to use backgroundfilecloser when in main thread. | |
309 | if not isinstance( |
|
309 | if not isinstance( | |
310 |
threading.current |
|
310 | threading.current_thread(), | |
311 | threading._MainThread, # pytype: disable=module-attr |
|
311 | threading._MainThread, # pytype: disable=module-attr | |
312 | ): |
|
312 | ): | |
313 | yield |
|
313 | yield | |
@@ -483,7 +483,7 b' class vfs(abstractvfs):' | |||||
483 | fp = checkambigatclosing(fp) |
|
483 | fp = checkambigatclosing(fp) | |
484 |
|
484 | |||
485 | if backgroundclose and isinstance( |
|
485 | if backgroundclose and isinstance( | |
486 |
threading.current |
|
486 | threading.current_thread(), | |
487 | threading._MainThread, # pytype: disable=module-attr |
|
487 | threading._MainThread, # pytype: disable=module-attr | |
488 | ): |
|
488 | ): | |
489 | if ( |
|
489 | if ( |
General Comments 0
You need to be logged in to leave comments.
Login now