In computercraft, there is a library parallel which can run two or more functions interleaved using the coroutine system. It also distributes incoming events to all coroutines. Now I tried to build something similar with OpenComputers.
However, if one of my coroutines calls computer.pullSignal(), it does not return to the resume call I made; the call get's handled internally. The coroutine.resume call will only return if I explicitly use coroutine.yield. So, I can't to proper parallelity. I know I can have multiple separate event handlers with the event.listen system, but I can't use delay functions in those.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hi,
In computercraft, there is a library parallel which can run two or more functions interleaved using the coroutine system. It also distributes incoming events to all coroutines. Now I tried to build something similar with OpenComputers.
However, if one of my coroutines calls computer.pullSignal(), it does not return to the resume call I made; the call get's handled internally. The coroutine.resume call will only return if I explicitly use coroutine.yield. So, I can't to proper parallelity. I know I can have multiple separate event handlers with the event.listen system, but I can't use delay functions in those.
Any Ideas how I can solve this?
Link to post
Share on other sites