Create EventType for RStream reading

RStream will be the main way Neovim receives asynchronous messages, so it is
best to have a specialized EventType for it. A new flag parameter was added to
`rstream_new` which tells the RStream instance to defer event handling for later
with KE_EVENT instead of handling it directly from libuv callback.
This commit is contained in:
Thiago de Arruda
2014-04-16 21:17:22 -03:00
parent c40428c934
commit 350144f511
7 changed files with 64 additions and 14 deletions

View File

@@ -8,6 +8,7 @@
#include "os/event.h"
#include "os/input.h"
#include "os/signal.h"
#include "os/rstream.h"
#include "os/job.h"
#include "vim.h"
#include "memory.h"
@@ -112,6 +113,9 @@ void event_process()
case kEventJobActivity:
job_handle(event);
break;
case kEventRStreamData:
rstream_read_event(event);
break;
default:
abort();
}