public final class Coroutine extends Object
This class does not expose any public API; to manipulate Coroutine
objects,
use the following methods in ExecutionContext
:
ExecutionContext.newCoroutine(LuaFunction)
;ExecutionContext.getCoroutineStatus(Coroutine)
;ExecutionContext.resume(Coroutine, Object[])
;ExecutionContext.yield(Object[])
.Note on equality: according to ยง3.4.4 of the Lua Reference Manual,
coroutines a
and b
are expected to be equal if and only if they are
the same object. However, Ordering.isRawEqual(Object, Object)
compares
coroutines using Object.equals(Object)
. Exercise caution when overriding
equals()
.
Copyright © 2016. All rights reserved.