event: Refactor async event processing

- Improve the implementation of deferred/immediate events.
- Use the new queue module to change how/when events are queued/processed by
  giving a private queue to each emitter.
- Immediate events(which only exist to break uv_run recursion) are now
  represented in the `loop->fast_events` queue.
- Events pushed to child queues are propagated to the event loop main queue and
  processed as K_EVENT keys.
This commit is contained in:
Thiago de Arruda
2015-08-07 22:54:02 -03:00
parent a6e0d35d2d
commit 502aee690c
28 changed files with 216 additions and 211 deletions

View File

@@ -493,7 +493,7 @@ normal_cmd (
input_disable_events();
if (c == K_EVENT) {
loop_process_event(&loop);
queue_process_events(loop.events);
return;
}