diff options
| author | 2020-03-06 11:24:08 -0400 | |
|---|---|---|
| committer | 2020-06-18 16:29:26 -0400 | |
| commit | 18f54f74862322d5a9360cbdc3541b6e3f15dce6 (patch) | |
| tree | 240226785f9dd934bc85ce76fea9b96d6916eeef /src/common/fiber.h | |
| parent | Common/Fiber: Implement Rewinding. (diff) | |
| download | yuzu-18f54f74862322d5a9360cbdc3541b6e3f15dce6.tar.gz yuzu-18f54f74862322d5a9360cbdc3541b6e3f15dce6.tar.xz yuzu-18f54f74862322d5a9360cbdc3541b6e3f15dce6.zip | |
Common/Fiber: Document fiber interexchange.
Diffstat (limited to 'src/common/fiber.h')
| -rw-r--r-- | src/common/fiber.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/fiber.h b/src/common/fiber.h index a710df257..3bbd506b5 100644 --- a/src/common/fiber.h +++ b/src/common/fiber.h | |||
| @@ -28,7 +28,10 @@ namespace Common { | |||
| 28 | * to implement such patterns. This fiber class is 'threadsafe' only one fiber | 28 | * to implement such patterns. This fiber class is 'threadsafe' only one fiber |
| 29 | * can be running at a time and threads will be locked while trying to yield to | 29 | * can be running at a time and threads will be locked while trying to yield to |
| 30 | * a running fiber until it yields. WARNING exchanging two running fibers between | 30 | * a running fiber until it yields. WARNING exchanging two running fibers between |
| 31 | * threads will cause a deadlock. | 31 | * threads will cause a deadlock. In order to prevent a deadlock, each thread should |
| 32 | * have an intermediary fiber, you switch to the intermediary fiber of the current | ||
| 33 | * thread and then from it switch to the expected fiber. This way you can exchange | ||
| 34 | * 2 fibers within 2 different threads. | ||
| 32 | */ | 35 | */ |
| 33 | class Fiber { | 36 | class Fiber { |
| 34 | public: | 37 | public: |