Add op_id throughout op API (#2734)

Removes the magic number hack to switch between flatbuffers and the
minimal dispatcher.

Adds machinery to pass the op_id through the shared_queue.
This commit is contained in:
Ryan Dahl 2019-08-07 14:02:29 -04:00 committed by GitHub
parent 5350abbc7f
commit e438ac2c74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 354 additions and 251 deletions

View file

@ -29,8 +29,8 @@ impl Worker {
{
let mut i = isolate.lock().unwrap();
let state_ = state.clone();
i.set_dispatch(move |control_buf, zero_copy_buf| {
state_.dispatch(control_buf, zero_copy_buf)
i.set_dispatch(move |op_id, control_buf, zero_copy_buf| {
state_.dispatch(op_id, control_buf, zero_copy_buf)
});
let state_ = state.clone();
i.set_js_error_create(move |v8_exception| {