Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate unused and not-recommended Threads.Mutex #32875

Merged
merged 1 commit into from
Aug 15, 2019
Merged

Conversation

JeffBezanson
Copy link
Member

@JeffBezanson JeffBezanson commented Aug 12, 2019

This kind of lock is not really compatible with our threading model. The only reason to use it would be for a lock held for a long period of time, but in that case the lock should be task-blocking (ReentrantLock) instead of thread-blocking, so other tasks can run.

Closes #32874
Closes #32873

@JeffBezanson JeffBezanson added the multithreading Base.Threads and related functionality label Aug 12, 2019
@ararslan
Copy link
Member

Seems like this could be breaking. Perhaps deprecate instead of hard removal?

@mbauman
Copy link
Member

mbauman commented Aug 12, 2019

The Threads module is marked as experimental. That said, I'd guess that some trivial uses might be covered by a const Mutex = Base.ReentrantLock? I do like the Mutex name better, but I suppose it's generally assumed not to be recursive in many languages…

@JeffBezanson
Copy link
Member Author

We could deprecate the binding to ReentrantLock maybe?

@mbauman mbauman changed the title remove unused and not-recommended Threads.Mutex deprecate unused and not-recommended Threads.Mutex Aug 15, 2019
@mbauman mbauman added the deprecation This change introduces or involves a deprecation label Aug 15, 2019
@JeffBezanson JeffBezanson merged commit 0eabe22 into master Aug 15, 2019
@JeffBezanson JeffBezanson deleted the jb/rmMutex branch August 15, 2019 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation This change introduces or involves a deprecation multithreading Base.Threads and related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UndefVarError: concurrency_violation not defined
3 participants