Skip to content

Commit f0f2001

Browse files
committed
Add ltask.current_token() for ltask.wait()
1 parent e4fd5d9 commit f0f2001

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lualib/service.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,10 @@ local function wait_response(type, ...)
510510
end
511511
end
512512

513+
function ltask.current_token()
514+
return running_thread
515+
end
516+
513517
function ltask.wait(token)
514518
token = token or running_thread
515519
assert(session_waiting[token] == nil)

0 commit comments

Comments
 (0)