-
Notifications
You must be signed in to change notification settings - Fork 445
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
std::cell::RefCell<regex::exec::ProgramCacheInner> can't be shared between threads #667
Comments
Can you provide a sample reproduction? Regex itself implements both Send and Sync, so it's not clear to me why you're seeing this error. |
@BurntSushi - apologies for the noise. I managed to work around it using a different approach. I had been using the |
I ran into the same error with Regex 1.3.9 in my project. Updating this crate to the latest 1.4.5 fixed it. CaptureMatches (which I was using) does not implement Send in that version which can also be seen in its documentation: Not sure why that is, but in case anyone else is running into this, upgrading to latest version should fix it. |
@kangalioo That's interesting. I am myself not even sure why the Since |
Apologies if this is documented and I missed it. I'm currently working with regex in some async stream work, and came across this error:
Is it possible to run regex in a mode that won't trip over the RefCell for the inner cache, by chance?
The text was updated successfully, but these errors were encountered: