Question

How do I utilize fibers best in my game code? Should it only be used to manage nonpreemptive context-switches while loading resources (i.e. files from disk)? Or do I allow all types of game entities to run in a fiber? How do I schedule?

C++ or pseudo code samples greatly appreciated!

Was it helpful?

Solution

Don't? It's like a thread only with very little CRT support (unlike threads) and some hidden memory requirements like stack and registers.

It may make non-system code easier to write but it complicates to an unjustifiable degree.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top