I ask about this out of curiosity.
Windows provides what they call the Fibers API , which is an API for lightweight user processes / threads.
I was wondering if Mac OS supports such features. To my knowledge, the closest Unix equivalent for this would be a setcontext family of functions. However, attempting to invoke such an API on a Mac raises warnings that features are deprecated with OSX 10.6. Also, when I try to compile and run the example specified in the Wikipedia link above, I get a seg error on my machine on the first swapcontext .
Thus, it is obvious that the setcontext API is not suitable for Mac. At least not anymore. Is there any other way to achieve an easy flow of users on Mac OS? Does the system provide such functionality?
source share