Reviewers: Vitaly Repeshko,
Message:
Fallout from my work on lockers, in separate patch to make code reviews
simple.
It turns out that pthread implementations reuse thread ids after the thread
dies, therefore ThreadHandle::IsSelf is unreliable, which made
ThreadManager->RestoreThread behave erroneously.
This change:
1) Gets rid of ThreadHandle class
2) Adds a new class ThreadRef, similiar in functionality to ThreadHandle,
but
based on v8-maintained thread identifier that is put into the thread local.
I
named the class ThreadRef instead of ThreadHandle since it is mutable (as
the
ThreadHandle was before, but Handle meand something immutable, at least to
me)
Description:
Do not rely on uniquiness of pthread_t
pthreads implementations are free to reuse pthread_t (thread id) after
the thread has died. This change gets rid of ThreadHandle class
and replaces it with v8-managed thread identifiers.
BUG=
TEST=
Please review this at http://codereview.chromium.org/6816038/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/isolate.h
M src/isolate.cc
M src/objects.cc
M src/platform-cygwin.cc
M src/platform-freebsd.cc
M src/platform-linux.cc
M src/platform-macos.cc
M src/platform-nullos.cc
M src/platform-openbsd.cc
M src/platform-solaris.cc
M src/platform-win32.cc
M src/platform.h
M src/v8.cc
M src/v8threads.h
M src/v8threads.cc
M test/cctest/test-threads.cc
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev