multiple data loops vs. invokes
The currently used loop implementation does not support concurrent invoke() from multiple different threads. With the introduction of multiple data loops, there is a chance that multiple data loops will try to invoke() on a singular main loop, potentially corrupting the invoke buffer in the process.
For example, stream.c:call_drained()
may very well be called from multiple separate data threads concurrently (at least as far as I can see). (Or am I missing some kind of safeguard against that?)