Page 1 of 1

Eventu: Safe Signals?

Posted: 26 Mar 2016, 3:21
by Sambo
If I send a signal before a coroutine is waiting for it, it throws an error. I think there should be a built-in safety for this function. It could simply be this condition:

Code: Select all

**NOT ACTUAL CODE**
If a coroutine is awaiting this signal then
   send the signal
end
(I see somebody made it so TAB can be used in a code box. Nice :) )

Also, there doesn't seem to be a function for testing if a coroutine is currently running. This may be useful for preventing multiple instances of a coroutine from running at the same time.