summaryrefslogtreecommitdiff
path: root/src/common/fiber.h
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-07-05 18:20:39 -0400
committerGitHub <noreply@github.com>2022-07-05 18:20:39 -0400
commit07e3c56f0de7a1567b1ae443abb64b767a31ed8c (patch)
tree3bd7d56181d79c69988d3f6d1310d9137cbb482f /src/common/fiber.h
parenteb4ce48b65f6c9ad227547daab7d1ff2b97c1690 (diff)
parented0319cfed2c99e6366aaf725d96bb28a9332e4d (diff)
Merge pull request #8532 from liamwhite/fiber-supplements
common/fiber: make fibers easier to use
Diffstat (limited to 'src/common/fiber.h')
-rw-r--r--src/common/fiber.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/common/fiber.h b/src/common/fiber.h
index 873604bc6..f24d333a3 100644
--- a/src/common/fiber.h
+++ b/src/common/fiber.h
@@ -29,7 +29,7 @@ namespace Common {
*/
class Fiber {
public:
- Fiber(std::function<void(void*)>&& entry_point_func, void* start_parameter);
+ Fiber(std::function<void()>&& entry_point_func);
~Fiber();
Fiber(const Fiber&) = delete;
@@ -43,16 +43,13 @@ public:
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);
+ void SetRewindPoint(std::function<void()>&& rewind_func);
void Rewind();
/// Only call from main thread's fiber
void Exit();
- /// Changes the start parameter of the fiber. Has no effect if the fiber already started
- void SetStartParameter(void* new_parameter);
-
private:
Fiber();