filesystem_spec
filesystem_spec copied to clipboard
Thread safety of get_lock in asyn.py
https://github.com/fsspec/filesystem_spec/blob/master/fsspec/asyn.py#L27-L35
If _lock is None, if two threads both enter get_lock, both threads could see _lock is None, one thread could create a new Lock, return it to the caller, then the second thread could create a new Lock and return that different lock to the caller.