aboutsummaryrefslogtreecommitdiff
path: root/src/lane.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lane.h')
-rw-r--r--src/lane.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lane.h b/src/lane.h
index 6146df8..7c75fe8 100644
--- a/src/lane.h
+++ b/src/lane.h
@@ -120,6 +120,14 @@ class Lane
120 Lane(Universe* U_, lua_State* L_, ErrorTraceLevel errorTraceLevel_); 120 Lane(Universe* U_, lua_State* L_, ErrorTraceLevel errorTraceLevel_);
121 ~Lane(); 121 ~Lane();
122 122
123 private:
124
125 [[nodiscard]] CancelResult cancelHard(std::chrono::time_point<std::chrono::steady_clock> until_, bool wakeLane_);
126 [[nodiscard]] CancelResult cancelSoft(std::chrono::time_point<std::chrono::steady_clock> until_, bool wakeLane_);
127
128 public:
129
130 CancelResult cancel(CancelOp op_, int hookCount_, std::chrono::time_point<std::chrono::steady_clock> until_, bool wakeLane_);
123 void changeDebugName(int const nameIdx_); 131 void changeDebugName(int const nameIdx_);
124 void close() { lua_State* _L{ L }; L = nullptr; lua_close(_L); } 132 void close() { lua_State* _L{ L }; L = nullptr; lua_close(_L); }
125 [[nodiscard]] std::string_view errorTraceLevelString() const; 133 [[nodiscard]] std::string_view errorTraceLevelString() const;
@@ -137,7 +145,7 @@ class Lane
137 145
138// To allow free-running threads (longer lifespan than the handle's) 146// To allow free-running threads (longer lifespan than the handle's)
139// 'Lane' are malloc/free'd and the handle only carries a pointer. 147// 'Lane' are malloc/free'd and the handle only carries a pointer.
140// This is not deep userdata since the handle's not portable among lanes. 148// This is not deep userdata since the handle is not portable among lanes.
141// 149//
142[[nodiscard]] inline Lane* ToLane(lua_State* L_, int i_) 150[[nodiscard]] inline Lane* ToLane(lua_State* L_, int i_)
143{ 151{