aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-06 11:24:08 -0400
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-18 16:29:26 -0400
commitf39a9f6efa9439f2e5c2c6243b1c4507a4efa3b2 (patch)
tree240226785f9dd934bc85ce76fea9b96d6916eeef /src/common
parent1460bdc5ab1ed6e33c005b652635dc5626ffe9f3 (diff)
Common/Fiber: Document fiber interexchange.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/fiber.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/fiber.h b/src/common/fiber.h
index a710df257a..3bbd506b50 100644
--- a/src/common/fiber.h
+++ b/src/common/fiber.h
@@ -28,7 +28,10 @@ namespace Common {
* to implement such patterns. This fiber class is 'threadsafe' only one fiber
* can be running at a time and threads will be locked while trying to yield to
* a running fiber until it yields. WARNING exchanging two running fibers between
- * threads will cause a deadlock.
+ * threads will cause a deadlock. In order to prevent a deadlock, each thread should
+ * have an intermediary fiber, you switch to the intermediary fiber of the current
+ * thread and then from it switch to the expected fiber. This way you can exchange
+ * 2 fibers within 2 different threads.
*/
class Fiber {
public: