I'll take on adding semaphore support to C3
I noticed that semaphores were not in the standard lib and could make things like the thread pool more efficient, so instead of polling a mutex eating CPU we could limit the capacity with a semaphore instead and save the resources. In some quick tests I was seeing 25-35 mutex checks typically with the initial implementation.
So far have added support for Linux and currently working on the windows implementation.
What's the best way to test MacOS as I don't own a Mac?
I am targeting a post V0.7 PR for this one
I guess CI. Or you just enable it for Win/Linux and let me do the MacOS implementation
Today I learned the unnamed semaphore functions are not supported on Mac
https://stackoverflow.com/questions/71977076/posix-semaphores-on-macos
Also mentioned here https://github.com/facebook/folly/issues/750
Will add some @if guards around those in the posix bindings. In the higher level c3wrapper will forward to the named semaphore functions and perhaps generate some names
What's the status?