Index: runtime/platform/thread.h |
diff --git a/runtime/platform/thread.h b/runtime/platform/thread.h |
index 0eb8da13b2b502412cc21ac54951290785a4a64e..005c41e29e2873140b6c27e1e3e49c81fbfb7099 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 void Join(ThreadHandle thread); |
Ivan Posva
2012/01/20 16:45:55
Please remove the Join functionality it is not rea
Søren Gjesse
2012/01/23 13:14:58
Why is Join not useful? Especially for testing I h
|
}; |