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

Use std::recursive_mutex when EASTL_CPP11_MUTEX_ENABLED is defined #14

Closed
Jasper-Bekkers opened this issue Feb 12, 2016 · 1 comment
Closed
Assignees

Comments

@Jasper-Bekkers
Copy link

Hi,

This tweet https://twitter.com/jdryg/status/698042963604144128 and this one https://twitter.com/jdryg/status/698043020046921730 from Jim Drygiannakis seem to suggest it might be a good idea / preferable to use std::recursive_mutex instead of std::mutex as a fallback for eastl::mutex, since the implementations (both Windows & pthreads) of eastl::mutex seems to use recusive locking.

I can't recall off the top of my head if eastl::mutex was always recursive, but I think it is / was on other platforms. What do you guys think?

@rparolin
Copy link
Contributor

EASTL doesn't implement any of the std::concurrency in the standard. It implements enough for an internal API that drives features like eastl::shared_ptr. Using a std::recursive_mutex would be preferable as long its available for use on all compilers.

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

No branches or pull requests

2 participants