aboutsummaryrefslogtreecommitdiff
path: root/src/common/fiber.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-03-08 13:51:37 -0800
committerGitHub <noreply@github.com>2021-03-08 13:51:37 -0800
commit69ce5e41ebd266b2cd04cb609663eaca21c8ded9 (patch)
treeed8f8429c89814266ac72db1fdf7591d03ab4c9a /src/common/fiber.h
parent9d77ae39deacbce581103a73525af974a79ba064 (diff)
parent8f7eb194af199ef7a3b225399e8d6fede27234f2 (diff)
Merge pull request #6041 from bunnei/fiber-leaks
common: fiber: Use weak_ptr when yielding.
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 f7f587f8c..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::shared_ptr<Fiber> 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);