This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Cross_Sans's profile picture

How do I make threads that uses events with the coroutine API ?

Started by Cross_Sans, 08 May 2017 - 12:00 PM
Cross_Sans #1
Posted 08 May 2017 - 02:00 PM
Hi, my question is "How do I make threads that uses events with the coroutine API ?". I have tried few times, but failed at each one. I was unable to get os.pullEvent() to work on any attempt I have made. Please make an example program.

Thanks for reading, Redall.
Lupus590 #2
Posted 08 May 2017 - 03:09 PM
two things:
first: BB's guide - http://www.computercraft.info/forums2/index.php?/topic/25670-
second: check how the parallel API does it - https://github.com/dan200/ComputerCraft/blob/master/src/main/resources/assets/computercraft/lua/rom/apis/parallel
Cross_Sans #3
Posted 08 May 2017 - 07:32 PM
Thanks for the links.