Repository navigation
Conversation
|
Can one of the admins verify this patch? Admins can comment |
jrbourbeau
left a comment
There was a problem hiding this comment.
Thanks for working on this @zklaus!
I don't think we should add a new dependency for this. If a lock is needed, let's use a theading / multiprocessing / etc. lock instead. Alternatively, I think avoiding the pop call until after registration has happened might also avoid the race condition. I'd be curious to get your thoughts on #9545.
|
I'll give the simpler approach a go and report in that issue. I agree that a new dependency should be avoided if possible and I was surprised to find that Python doesn't have a rwlock, c.f. python/cpython#53046. |
|
Superseded by #9545. |
dask.utils:Dispatch.dispatch#9181pre-commit run --all-filesThis is a draft. Essentially, it adds a readers-writer lock using a new dependency to guard the lazy loading of dispatchers against a race condition. If you want to try it out, you must manually install the
readerwriterlockpackage.