4 ms·
Fibers have some annoying edge cases related to thread local storage, which can bite fiber unaware code. Which is why Microsoft recently added User-Mode Schedul
by CodesInChaos 8y ago
Fibers have some annoying edge cases related to thread local storage, which can bite fiber unaware code. Which is why Microsoft recently added User-Mode Scheduling, which behave much closer to actual threads, except that they still have the manual yielding behaviour of fibers.
https://docs.microsoft.com/en-us/windows/desktop/procthread/user-mode-scheduling https://docs.microsoft.com/en-us/windows/desktop/procthread/...
- petermcneeley 8y agoYes this is actually a significant issue since TLS is used in many cases to implement locks and mutex.
- jstimpfle 8y agoThat's because what you need is Fiber-local storage no?
- dblohm7 8y agoWhat happens when you call an API that isn't fiber-aware and uses thread-local storage in its implementation? Basically your entire stack needs to be fiber-aware, or you can't use them.