Closed dpogue closed 1 year ago
I don't remember why the pthread timed join was problematic on Linux. I'm assuming that the problem on macOS is that the call is not available. Can you recap the issue for me so that I can better understand the goal of these changes?
I don't remember why the pthread timed join was problematic on Linux. I'm assuming that the problem on macOS is that the call is not available. Can you recap the issue for me so that I can better understand the goal of these changes?
Two issues here:
The standard solution seems to be adding some sort of wrapping std::thread to add a lock to the end of execution that can be waited on - because locking has a timeout capability. Basically implementing the functionality using locks instead of trying to rely on anything built in to threads - which is also portable.
The ASIO branch has examined this problem in a lot more detail and taken a different approach (which seems to be working), so I'm going to close this
Fixes some crashes with the pthread timed joins and also adds the ability to do a timed join on macOS.
I left Windows using the existing implementation because Hoikas said futures had major performance issues in MSVC.