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

About Z3_MUTEX #142

Closed
black-binary opened this issue Apr 19, 2021 · 3 comments
Closed

About Z3_MUTEX #142

black-binary opened this issue Apr 19, 2021 · 3 comments

Comments

@black-binary
Copy link

I'm currently developing a multi-threaded program, but it seems like almost every function call to the z3 library is mutex-guarded. My threads will frequently create expressions and eval() them, and each thread has its own Context (unsafe impl Send for Context)

I'm wondering if the Z3_MUTEX will slow down my code. If so, is it safe to remove the Z3_MUTEX in my code? Thanks :)

@waywardmonkeys
Copy link
Contributor

The last time that I looked at this, a couple of years ago now, I guess, it was necessary because of bugs in Z3, perhaps on macOS. I think those bugs were fixed, but I don't know if there are new ones or not.

You might be able to investigate whether or not it can be removed. :)

@black-binary
Copy link
Author

@waywardmonkeys Thanks for your reply. I plan to run a stress test parallelly after removing the mutex, and see if it will crash.

@waywardmonkeys
Copy link
Contributor

This has been removed now in #211 (follow on to #143).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants