summaryrefslogtreecommitdiff
path: root/src/common/fiber.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-03-07 13:46:53 -0800
committerbunnei <bunneidev@gmail.com>2021-03-07 13:46:53 -0800
commit8f7eb194af199ef7a3b225399e8d6fede27234f2 (patch)
tree5b4bc3648e7dc9abf39312cb62e55e8feba92ae1 /src/common/fiber.h
parent68ffac250ae2d1c2d5d961304d2c61f6755ab033 (diff)
common: Fiber: use a reference for YieldTo.
- Fixes another small leak.
Diffstat (limited to 'src/common/fiber.h')
-rw-r--r--src/common/fiber.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/fiber.h b/src/common/fiber.h
index d96be6019..f2a8ff29a 100644
--- a/src/common/fiber.h
+++ b/src/common/fiber.h
@@ -41,7 +41,7 @@ public:
/// Yields control from Fiber 'from' to Fiber 'to'
/// Fiber 'from' must be the currently running fiber.
- static void YieldTo(std::weak_ptr<Fiber> weak_from, std::shared_ptr<Fiber> to);
+ static void YieldTo(std::weak_ptr<Fiber> weak_from, Fiber& to);
[[nodiscard]] static std::shared_ptr<Fiber> ThreadToFiber();
void SetRewindPoint(std::function<void(void*)>&& rewind_func, void* rewind_param);