diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-04-29 13:50:36 +0200 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2015-05-01 13:52:11 +0200 |
commit | 30b7349176da785cd7294fec8c31cfb9c5f791e8 (patch) | |
tree | 654a06fd798ea50bf023c01071473f509446abbd /src/stream_base.cc | |
parent | 78f4b038f89349f1c033911178fb6b411831e99e (diff) | |
download | node-new-30b7349176da785cd7294fec8c31cfb9c5f791e8.tar.gz |
stream_base: dispatch reqs in the stream impl
Dispatch requests in the implementation of the stream, not in the code
creating these requests. The requests might be piled up and invoked
internally in the implementation, so it should know better when it is
the time to dispatch them.
In fact, TLS was doing exactly this thing which led us to...
Fix: https://github.com/iojs/io.js/issues/1512
PR-URL: https://github.com/iojs/io.js/pull/1563
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Diffstat (limited to 'src/stream_base.cc')
-rw-r--r-- | src/stream_base.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/stream_base.cc b/src/stream_base.cc index 3a9f30f279..b2518404a8 100644 --- a/src/stream_base.cc +++ b/src/stream_base.cc @@ -60,7 +60,6 @@ int StreamBase::Shutdown(const FunctionCallbackInfo<Value>& args) { AfterShutdown); int err = DoShutdown(req_wrap); - req_wrap->Dispatched(); if (err) delete req_wrap; return err; @@ -181,7 +180,6 @@ int StreamBase::Writev(const FunctionCallbackInfo<Value>& args) { if (bufs != bufs_) delete[] bufs; - req_wrap->Dispatched(); req_wrap->object()->Set(env->async(), True(env->isolate())); req_wrap->object()->Set(env->bytes_string(), Number::New(env->isolate(), bytes)); @@ -228,7 +226,6 @@ int StreamBase::WriteBuffer(const FunctionCallbackInfo<Value>& args) { req_wrap = WriteWrap::New(env, req_wrap_obj, this, AfterWrite); err = DoWrite(req_wrap, bufs, count, nullptr); - req_wrap->Dispatched(); req_wrap_obj->Set(env->async(), True(env->isolate())); if (err) @@ -347,7 +344,6 @@ int StreamBase::WriteString(const FunctionCallbackInfo<Value>& args) { reinterpret_cast<uv_stream_t*>(send_handle)); } - req_wrap->Dispatched(); req_wrap->object()->Set(env->async(), True(env->isolate())); if (err) |