16 posts
Posted 15 July 2014 - 02:54 PM
I want to get multiple os.PullEventRaw() going on the same time, is that possible? if yes, how?
7508 posts
Location
Australia
Posted 15 July 2014 - 03:06 PM
Simple answer yes. Better answer, yes but you shouldn't need it.
If you call
os.pullEvent/
pullEventRaw without any arguments it will capture any event, you can then use if statements to check if the event is what you wanted, and run based off that. Be aware that when using event loops you should not use any function that yields, including, but not limited to;
read,
sleep, any
rednet.receive,
gps.locate, any turtle api function, etc.
If however your question was more aimed at having say a loop that is running 'at the same time' as a program, then you'll want to take a look at the
Parallel API