Chromium Code Reviews| Index: runtime/platform/thread.h |
| diff --git a/runtime/platform/thread.h b/runtime/platform/thread.h |
| index 0eb8da13b2b502412cc21ac54951290785a4a64e..931539543c2e8dc0adb6bffa95640498c00c1196 100644 |
| --- a/runtime/platform/thread.h |
| +++ b/runtime/platform/thread.h |
| @@ -22,17 +22,15 @@ namespace dart { |
| class Thread { |
| public: |
| - // Function to be called on thread start. |
| - typedef void (*ThreadStartFunction) (uword parameter); |
| - |
| - // TODO(iposva): Define the proper interface for spawning and killing threads. |
| - Thread(ThreadStartFunction function, uword parameters); |
| - ~Thread(); |
| + static const int64_t kNoTimeout = 0; |
| + static const ThreadHandle kInvalidThreadHandle; |
| - private: |
| - ThreadData data_; |
| + typedef void (*ThreadStartFunction) (uword parameter); |
| - DISALLOW_COPY_AND_ASSIGN(Thread); |
| + // Start a thread running the specified function. |
| + static ThreadHandle Start(ThreadStartFunction function, uword parameters); |
| + // Wait for thread termination or timeout. |
| + static bool Join(ThreadHandle thread, int64_t millis = kNoTimeout); |
|
Mads Ager (google)
2012/01/20 12:35:34
Do you need the timeout version of this. I don't s
Søren Gjesse
2012/01/20 13:25:45
Good point, removed.
|
| }; |