lua.wetgenes.tasks.create_colinda
local colinda=require("wetgenes.tasks").colinda(linda)
Create a colinda which is a wrapper around a linda providing replacement functions to be used inside a coroutine so it will yield (and assume it will be resumed) rather than wait.
This should be a dropin replacement for a linda and will fallback to normal linda use if not in a coroutine.
If linda is nil then we will create one, the linda used in this colinda can be found in colinda.linda if you need raw access.
What we are doing here is wrapping the send/receive functions so that
colinda:send(time,...)
colinda:recieve(time,...)
will be replaced with functions that call
linda:send(0,...)
linda:recieve(0,...)
and use coroutines.yield to mimic the original timeout value without blocking.