Jump to content


Member Since 20 Jun 2012
Offline Last Active Aug 08 2019 03:37 PM

Posts I've Made

In Topic: Can't end program using error() function in parallel? What alternative ca...

14 January 2019 - 04:16 PM

I don't know what's going on here. If "Chat exited" is being printed, and "111" isn't, then you know that the `error()` call is ending the coroutine. From the source of parallel.waitForAny (notably line 30), if a coroutine errors, the error should propagate, so the fact that you're seeing "ok" is very weird.

I've tested a modified version of your code on ccemux:

Maybe upload the full code to pastebin? Also, what version of CC are you using, as there may be differences in the parallel API...?

It's also worth noting that error() generally isn't used to end programs, and a conditional loop like what Luca_S suggested is usually better. Doesn't matter too much though. Whatever works.