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

Add mutexes to all calls in std::rl #4758

Closed
brson opened this issue Feb 2, 2013 · 5 comments
Closed

Add mutexes to all calls in std::rl #4758

brson opened this issue Feb 2, 2013 · 5 comments
Labels
A-concurrency Area: Concurrency E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Feb 2, 2013

This module is unsafe because the linenoise library is not threadsafe. Use core::private::global_data to store a global std::sync::Mutex and use that mutex to protect all the calls in rl.

Then make all the functions safe: #3921

@brson
Copy link
Contributor Author

brson commented Feb 2, 2013

Also, like core::os::getenv, please leave a note in the comments indicating that this should use a truly global mutex once the language supports global variables (global_data is runtime-global).

@catamorphism
Copy link
Contributor

I guess this really could break existing code, though it doesn't look like it was ever nominated. Commenting to reset the counter.

@huonw
Copy link
Member

huonw commented Aug 5, 2013

Triage; still an issue.

I can't see a global_data-like module anywhere any more, although this is probably unnecessary now that we have unsafe mut and can store a global mutex directly.

@brson
Copy link
Contributor Author

brson commented Oct 10, 2013

Not sure why this is on a milestone. Removing.

@huonw
Copy link
Member

huonw commented Oct 10, 2013

Closed by #9096.

@huonw huonw closed this as completed Oct 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-concurrency Area: Concurrency E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants