Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Issue 9141005: Change the thread interface in runtime/platform and use it starting all threads (Closed)

Created:
8 years, 11 months ago by Søren Gjesse
Modified:
8 years, 10 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Change the thread interface in runtime/platform and use it starting all threads The platform thread interface (dart::thread) is now refactored to an all static interface as suggested by iposva@ and asiva@. Use this interface for running all threads in the VM. R=ager@google.com, iposva@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=3830

Patch Set 1 #

Patch Set 2 : Fixed Mac OS and Windows build #

Patch Set 3 : Fix Mac OS build/test #

Patch Set 4 : Rebased to r3454 #

Total comments: 10

Patch Set 5 : Addressed review comments from ager@ #

Total comments: 8

Patch Set 6 : Addressed review comments from iposva@ #

Patch Set 7 : Removed Thread::Join as suggested by iposva@ #

Total comments: 12

Patch Set 8 : Addressed review comments from iposva@ and asiva@ #

Patch Set 9 : Fixed Windows build #

Patch Set 10 : Rebased to r3537 #

Total comments: 11

Patch Set 11 : Addressed review comments from asiva@ #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -358 lines) Patch
M runtime/bin/builtin_impl_sources.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -6 lines 0 comments Download
M runtime/bin/eventhandler_linux.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/eventhandler_linux.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +7 lines, -9 lines 0 comments Download
M runtime/bin/eventhandler_macos.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/eventhandler_macos.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +7 lines, -9 lines 0 comments Download
M runtime/bin/eventhandler_win.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -8 lines 0 comments Download
M runtime/bin/thread_pool.h View 1 2 3 4 5 6 2 chunks +4 lines, -14 lines 0 comments Download
M runtime/bin/thread_pool.cc View 1 2 3 4 5 6 7 2 chunks +32 lines, -3 lines 2 comments Download
D runtime/bin/thread_pool_linux.h View 1 2 3 1 chunk +0 lines, -33 lines 0 comments Download
D runtime/bin/thread_pool_linux.cc View 1 chunk +0 lines, -33 lines 0 comments Download
D runtime/bin/thread_pool_macos.h View 1 2 3 1 chunk +0 lines, -33 lines 0 comments Download
D runtime/bin/thread_pool_macos.cc View 1 chunk +0 lines, -33 lines 0 comments Download
D runtime/bin/thread_pool_win.h View 1 2 3 1 chunk +0 lines, -27 lines 0 comments Download
D runtime/bin/thread_pool_win.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M runtime/lib/isolate.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M runtime/platform/thread.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -9 lines 0 comments Download
M runtime/platform/thread_linux.h View 1 2 3 4 5 6 1 chunk +0 lines, -16 lines 0 comments Download
M runtime/platform/thread_linux.cc View 1 2 3 4 5 6 7 3 chunks +24 lines, -25 lines 0 comments Download
M runtime/platform/thread_macos.h View 1 2 3 4 5 6 1 chunk +0 lines, -16 lines 0 comments Download
M runtime/platform/thread_macos.cc View 1 2 3 4 5 6 7 2 chunks +25 lines, -26 lines 0 comments Download
M runtime/platform/thread_win.h View 1 2 3 4 5 6 1 chunk +0 lines, -15 lines 0 comments Download
M runtime/platform/thread_win.cc View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -20 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/message_queue_test.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/port_test.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Søren Gjesse
8 years, 11 months ago (2012-01-20 11:56:41 UTC) #1
Mads Ager (google)
http://codereview.chromium.org/9141005/diff/2002/runtime/bin/thread_pool.cc File runtime/bin/thread_pool.cc (right): http://codereview.chromium.org/9141005/diff/2002/runtime/bin/thread_pool.cc#newcode69 runtime/bin/thread_pool.cc:69: calloc(size_, sizeof(dart::ThreadHandle))); I think we usually use 4-space indent ...
8 years, 11 months ago (2012-01-20 12:35:34 UTC) #2
Søren Gjesse
http://codereview.chromium.org/9141005/diff/2002/runtime/bin/thread_pool.cc File runtime/bin/thread_pool.cc (right): http://codereview.chromium.org/9141005/diff/2002/runtime/bin/thread_pool.cc#newcode69 runtime/bin/thread_pool.cc:69: calloc(size_, sizeof(dart::ThreadHandle))); On 2012/01/20 12:35:34, Mads Ager wrote: > ...
8 years, 11 months ago (2012-01-20 13:25:45 UTC) #3
Ivan Posva
https://chromiumcodereview.appspot.com/9141005/diff/5027/runtime/bin/thread_pool.cc File runtime/bin/thread_pool.cc (right): https://chromiumcodereview.appspot.com/9141005/diff/5027/runtime/bin/thread_pool.cc#newcode83 runtime/bin/thread_pool.cc:83: dart::Thread::Join(threads_[i]); This will not work, please see comment in ...
8 years, 11 months ago (2012-01-20 16:45:55 UTC) #4
Søren Gjesse
I am not sure why you don't like Thread::Join. However I have now two different ...
8 years, 11 months ago (2012-01-23 13:14:57 UTC) #5
Ivan Posva
Pulling the implementation of the TaskQueue into thread_pool.cc can be done in a different CL, ...
8 years, 11 months ago (2012-01-24 02:04:01 UTC) #6
siva
DBC http://codereview.chromium.org/9141005/diff/12001/runtime/bin/thread_pool.cc File runtime/bin/thread_pool.cc (right): http://codereview.chromium.org/9141005/diff/12001/runtime/bin/thread_pool.cc#newcode70 runtime/bin/thread_pool.cc:70: reinterpret_cast<uword>(this)); If you choose to have an error ...
8 years, 11 months ago (2012-01-24 02:26:05 UTC) #7
Søren Gjesse
https://chromiumcodereview.appspot.com/9141005/diff/12001/runtime/bin/thread_pool.cc File runtime/bin/thread_pool.cc (right): https://chromiumcodereview.appspot.com/9141005/diff/12001/runtime/bin/thread_pool.cc#newcode70 runtime/bin/thread_pool.cc:70: reinterpret_cast<uword>(this)); On 2012/01/24 02:26:05, asiva wrote: > If you ...
8 years, 11 months ago (2012-01-24 12:07:55 UTC) #8
Søren Gjesse
PTAL
8 years, 11 months ago (2012-01-26 16:23:10 UTC) #9
siva
http://codereview.chromium.org/9141005/diff/19004/runtime/bin/eventhandler_linux.cc File runtime/bin/eventhandler_linux.cc (right): http://codereview.chromium.org/9141005/diff/19004/runtime/bin/eventhandler_linux.cc#newcode344 runtime/bin/eventhandler_linux.cc:344: reinterpret_cast<EventHandlerImplementation*>(args); ASSERT(handler != NULL); http://codereview.chromium.org/9141005/diff/19004/runtime/bin/eventhandler_macos.cc File runtime/bin/eventhandler_macos.cc (right): http://codereview.chromium.org/9141005/diff/19004/runtime/bin/eventhandler_macos.cc#newcode342 ...
8 years, 11 months ago (2012-01-27 18:53:17 UTC) #10
Søren Gjesse
http://codereview.chromium.org/9141005/diff/19004/runtime/bin/eventhandler_linux.cc File runtime/bin/eventhandler_linux.cc (right): http://codereview.chromium.org/9141005/diff/19004/runtime/bin/eventhandler_linux.cc#newcode344 runtime/bin/eventhandler_linux.cc:344: reinterpret_cast<EventHandlerImplementation*>(args); On 2012/01/27 18:53:17, asiva wrote: > ASSERT(handler != ...
8 years, 10 months ago (2012-01-30 14:42:57 UTC) #11
siva
LGTM The TaskQueue abstraction change will be addressed in another CL. http://codereview.chromium.org/9141005/diff/19004/runtime/bin/thread_pool.h File runtime/bin/thread_pool.h (right): ...
8 years, 10 months ago (2012-02-02 05:53:07 UTC) #12
Ivan Posva
LGTM, but the duplicate class name needs to be resolved. Thanks -Ivan https://chromiumcodereview.appspot.com/9141005/diff/27001/runtime/bin/thread_pool.cc File runtime/bin/thread_pool.cc ...
8 years, 10 months ago (2012-02-02 07:53:24 UTC) #13
Søren Gjesse
8 years, 10 months ago (2012-02-02 08:46:08 UTC) #14
https://chromiumcodereview.appspot.com/9141005/diff/27001/runtime/bin/thread_...
File runtime/bin/thread_pool.cc (right):

https://chromiumcodereview.appspot.com/9141005/diff/27001/runtime/bin/thread_...
runtime/bin/thread_pool.cc:67: MonitorLocker monitor(&monitor_);
On 2012/02/02 07:53:24, Ivan Posva wrote:
> It is very, very confusing to have two different MonitorLocker classes!

They are in different namespaces though. I will try to come up with two
different names though.

Powered by Google App Engine
This is Rietveld 408576698