comparison osx/include/kj/thread.h @ 147:45360b968bf4

Cap'n Proto v0.6 + build for OSX
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 22 May 2017 10:01:37 +0100
parents 41e769c91eca
children
comparison
equal deleted inserted replaced
146:206f0eb279b8 147:45360b968bf4
48 // Send a Unix signal to the given thread, using pthread_kill or an equivalent. 48 // Send a Unix signal to the given thread, using pthread_kill or an equivalent.
49 #endif 49 #endif
50 50
51 void detach(); 51 void detach();
52 // Don't join the thread in ~Thread(). 52 // Don't join the thread in ~Thread().
53 //
54 // TODO(soon): Currently broken: the thread uses the Thread objects during its execution; instead
55 // the Thread object and the thread itself will need to share a refcounted object.
56 53
57 private: 54 private:
58 struct ThreadState { 55 struct ThreadState {
59 Function<void()> func; 56 Function<void()> func;
60 kj::Maybe<kj::Exception> exception; 57 kj::Maybe<kj::Exception> exception;