fsspec / fsspec/filesystem_spec
Thread safety of get_lock in asyn.py
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 490
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 38
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading fsspec/asyn.py at lines 27-35 and trace the get_lock entry point. Check how concurrent calls can initialize _lock, then verify that the completed change ensures callers receive the same lock without introducing a new race.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100