diff options
Diffstat (limited to 'src/lane.cpp')
-rw-r--r-- | src/lane.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lane.cpp b/src/lane.cpp index 9751aeb..6f4935e 100644 --- a/src/lane.cpp +++ b/src/lane.cpp | |||
@@ -94,7 +94,7 @@ static LUAG_FUNC(set_debug_threadname) | |||
94 | // ################################################################################################# | 94 | // ################################################################################################# |
95 | 95 | ||
96 | //--- | 96 | //--- |
97 | // [...] | [nil, err_any, stack_tbl]= thread_join( lane_ud [, wait_secs=-1] ) | 97 | // [...] | [nil, err_any, stack_tbl]= lane:join([wait_secs]) |
98 | // | 98 | // |
99 | // timeout: returns nil | 99 | // timeout: returns nil |
100 | // done: returns return values (0..N) | 100 | // done: returns return values (0..N) |
@@ -114,7 +114,7 @@ static LUAG_FUNC(thread_join) | |||
114 | raise_luaL_argerror(L_, 2, "duration cannot be < 0"); | 114 | raise_luaL_argerror(L_, 2, "duration cannot be < 0"); |
115 | } | 115 | } |
116 | 116 | ||
117 | } else if (!lua_isnoneornil(L_, 2)) { // alternate explicit "infinite timeout" by passing nil before the key | 117 | } else if (!lua_isnoneornil(L_, 2)) { |
118 | raise_luaL_argerror(L_, 2, "incorrect duration type"); | 118 | raise_luaL_argerror(L_, 2, "incorrect duration type"); |
119 | } | 119 | } |
120 | 120 | ||
@@ -179,7 +179,7 @@ static LUAG_FUNC(thread_join) | |||
179 | LUA_ASSERT(L_, false); | 179 | LUA_ASSERT(L_, false); |
180 | _ret = 0; | 180 | _ret = 0; |
181 | } | 181 | } |
182 | _lane->close(); | 182 | _lane->closeState(); |
183 | STACK_CHECK(L_, _ret); | 183 | STACK_CHECK(L_, _ret); |
184 | return _ret; | 184 | return _ret; |
185 | } | 185 | } |
@@ -707,7 +707,7 @@ static void lane_main(Lane* lane_) | |||
707 | lane_->waiting_on = nullptr; // just in case | 707 | lane_->waiting_on = nullptr; // just in case |
708 | if (selfdestruct_remove(lane_)) { // check and remove (under lock!) | 708 | if (selfdestruct_remove(lane_)) { // check and remove (under lock!) |
709 | // We're a free-running thread and no-one's there to clean us up. | 709 | // We're a free-running thread and no-one's there to clean us up. |
710 | lane_->close(); | 710 | lane_->closeState(); |
711 | lane_->U->selfdestructMutex.lock(); | 711 | lane_->U->selfdestructMutex.lock(); |
712 | // done with lua_close(), terminal shutdown sequence may proceed | 712 | // done with lua_close(), terminal shutdown sequence may proceed |
713 | lane_->U->selfdestructingCount.fetch_sub(1, std::memory_order_release); | 713 | lane_->U->selfdestructingCount.fetch_sub(1, std::memory_order_release); |
@@ -793,7 +793,7 @@ static LUAG_FUNC(lane_gc) | |||
793 | return 0; | 793 | return 0; |
794 | } else if (_lane->L) { | 794 | } else if (_lane->L) { |
795 | // no longer accessing the Lua VM: we can close right now | 795 | // no longer accessing the Lua VM: we can close right now |
796 | _lane->close(); | 796 | _lane->closeState(); |
797 | // just in case, but _lane will be freed soon so... | 797 | // just in case, but _lane will be freed soon so... |
798 | _lane->debugName = std::string_view{ "<gc>" }; | 798 | _lane->debugName = std::string_view{ "<gc>" }; |
799 | } | 799 | } |