May 2017
Intermediate to advanced
416 pages
21h 33m
English
To obtain the current coroutine running, use the function coroutine.running:
nt =coroutine.create(function() print("New CO!") print(coroutine.running()) end) print(coroutine.running()) coroutine.resume(nt)
The output will be as follows:
thread: 0x931a008 true New CO! thread: 0x931da78 false
Read now
Unlock full access