diff options
Diffstat (limited to 'src/lane.hpp')
-rw-r--r-- | src/lane.hpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lane.hpp b/src/lane.hpp index 183c8bf..595bf4d 100644 --- a/src/lane.hpp +++ b/src/lane.hpp | |||
@@ -166,11 +166,9 @@ class Lane | |||
166 | CancelResult cancel(CancelOp op_, std::chrono::time_point<std::chrono::steady_clock> until_, WakeLane wakeLane_, int hookCount_); | 166 | CancelResult cancel(CancelOp op_, std::chrono::time_point<std::chrono::steady_clock> until_, WakeLane wakeLane_, int hookCount_); |
167 | void closeState() | 167 | void closeState() |
168 | { | 168 | { |
169 | lua_State* const _L{ S }; | ||
170 | S = nullptr; | ||
171 | L = nullptr; | 169 | L = nullptr; |
172 | nresults = 0; | 170 | nresults = 0; |
173 | lua_close(_L); // this collects our coroutine thread at the same time | 171 | lua_close(std::exchange(S, nullptr)); // this collects our coroutine thread at the same time |
174 | } | 172 | } |
175 | [[nodiscard]] | 173 | [[nodiscard]] |
176 | std::string_view errorTraceLevelString() const; | 174 | std::string_view errorTraceLevelString() const; |