Closed txdv closed 10 years ago
Context.Start() runs the context until something in the context stops the run. There are nonblocking run methods on the context, just read the interface. :)
I know that there is a non blocking variant, but the variant in node blocks only if there is some work to process, if there is nothing on the loop, it will fall through, if there is some work, it won't - it will actually block.
I wonder If we should introduce a feature so context.Start() would not block if there would be nothing on the loop. Imagine you would just open up an udp socket, send some packets somewhere without listening and then close it. Node supports something like that, though they have only 1 event loop, but it will just end the program if no tcp socket is open or listening.
Furthermore, as much as I remember I tried to use Stop() in order to actually get out of the loop, but had no luck as well. Was that tested? Or am I doing something wrong? I'll try to add a test case.