|
|
|
|
|
by dosshell
13 hours ago
|
|
Some context: Fiber is a datastructure where the execution context is saved. Eg. registers (including instruction pointer) and stack etc. That is a fiber: data. You normally use a threadpool, core pinned, to execute these fibers. Since you jump in userspace, you more or less only have to pay for cache misses. There are many upsides of designing a program using fibers. The major downside i see is that you can not blindly trust mutex and semaphores any longer - since the fiber can change execution thread while yielding/waiting for condition. |
|