Browse files

isolates: remove references to uv_thread_self()

uv_thread_self() is difficult to implement on Windows in a way where the return
value is valid across threads. It's already been removed from upstream libuv.
  • Loading branch information...
1 parent 8a98c2f commit 03cb903e7e3a35350ba09af052eac7844ae070e9 @bnoordhuis bnoordhuis committed Jan 16, 2012
Showing with 1 addition and 6 deletions.
  1. +1 −4 src/node.cc
  2. +0 −2 src/node_isolate.cc
View
5 src/node.cc
@@ -2679,13 +2679,10 @@ int Start(int argc, char *argv[]) {
v8::V8::Initialize();
v8::HandleScope handle_scope;
- // Get the id of the this, the main, thread.
- uv_thread_t tid = uv_thread_self();
-
// Create the main node::Isolate object
node::Isolate::Initialize();
Isolate* isolate = new node::Isolate();
- isolate->tid_ = tid;
+ isolate->tid_ = (uv_thread_t) -1;
isolate->Enter();
StartThread(isolate, argc, argv);
isolate->Dispose();
View
2 src/node_isolate.cc
@@ -219,7 +219,6 @@ void Isolate::OnMessage(IsolateMessage* msg, void* arg) {
HandleScope scope;
Isolate* self = static_cast<Isolate*>(arg);
- assert(uv_thread_self() == self->tid_);
NODE_ISOLATE_CHECK(self);
Buffer* buf = Buffer::New(msg->data_, msg->size_, IsolateMessage::Free, msg);
@@ -426,7 +425,6 @@ struct IsolateWrap: public ObjectWrap {
}
void OnMessage(IsolateMessage* msg) {
- assert(uv_thread_self() != isolate_->tid_);
NODE_ISOLATE_CHECK(parent_isolate_);
HandleScope scope;
Buffer* buf = Buffer::New(

0 comments on commit 03cb903

Please sign in to comment.