diff options
Diffstat (limited to 'src/common/fiber.h')
| -rw-r--r-- | src/common/fiber.h | 7 |
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 { | |||
| 29 | */ | 29 | */ |
| 30 | class Fiber { | 30 | class Fiber { |
| 31 | public: | 31 | public: |
| 32 | Fiber(std::function<void(void*)>&& entry_point_func, void* start_parameter); | 32 | Fiber(std::function<void()>&& entry_point_func); |
| 33 | ~Fiber(); | 33 | ~Fiber(); |
| 34 | 34 | ||
| 35 | Fiber(const Fiber&) = delete; | 35 | Fiber(const Fiber&) = delete; |
| @@ -43,16 +43,13 @@ public: | |||
| 43 | static void YieldTo(std::weak_ptr<Fiber> weak_from, Fiber& to); | 43 | static void YieldTo(std::weak_ptr<Fiber> weak_from, Fiber& to); |
| 44 | [[nodiscard]] static std::shared_ptr<Fiber> ThreadToFiber(); | 44 | [[nodiscard]] static std::shared_ptr<Fiber> ThreadToFiber(); |
| 45 | 45 | ||
| 46 | void SetRewindPoint(std::function<void(void*)>&& rewind_func, void* rewind_param); | 46 | void SetRewindPoint(std::function<void()>&& rewind_func); |
| 47 | 47 | ||
| 48 | void Rewind(); | 48 | void Rewind(); |
| 49 | 49 | ||
| 50 | /// Only call from main thread's fiber | 50 | /// Only call from main thread's fiber |
| 51 | void Exit(); | 51 | void Exit(); |
| 52 | 52 | ||
| 53 | /// Changes the start parameter of the fiber. Has no effect if the fiber already started | ||
| 54 | void SetStartParameter(void* new_parameter); | ||
| 55 | |||
| 56 | private: | 53 | private: |
| 57 | Fiber(); | 54 | Fiber(); |
| 58 | 55 | ||