This GitHub page aims to provide additional information for the bachelor thesis paper ‘A Comparison between Threads, Fibers and Coroutines for Developing Concurrent Software.’ The paper explains the primary differences between threads, fibers and coroutines. The intention is to provide a resource that may help make an educated decision when choosing between using threads, fibers and coroutines in projects. To achieve this aim, the paper dives into the theoretical differences between the technologies, works out a simple example using all different technologies, and compares their speed and memory usage. This GitHub page will provide the complete code matching the shortened extracts in the paper. It will also expand on certain subjects that could not fit cleanly within the paper but might still provide helpful information to interested readers.

All provided code examples will use the C++ programming language. When working with threads, fibers and stackful coroutines, their implementations from the Boost library will be used to provide uniformity.

The content discussed on this site originated as part of a bachelor thesis in the School of Information Technology at tUL (School voor Informatietechnologie van de tUL).