diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-27 19:46:15 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-27 19:46:15 -0800 |
commit | cf54ad8242056ae6d686fa6455b24427f4411e18 (patch) | |
tree | a1cc4a8bec1d1688114a19b07a1b29e6b7f9b361 /iothread.h | |
parent | fdfa5c06028d3473f57cea497a6682a8e550352f (diff) |
Change to wait for all outstanding iothreads before calling fork(). This should prevent a whole host of threading/fork interactions, but may also compromise performance...we'll see.
Diffstat (limited to 'iothread.h')
-rw-r--r-- | iothread.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -22,11 +22,12 @@ int iothread_perform_base(int (*handler)(void *), void (*completionCallback)(voi */ int iothread_port(void); -/** - Services one iothread competion callback. -*/ +/** Services one iothread competion callback. */ void iothread_service_completion(void); +/** Cancels all outstanding requests and waits for all iothreads to terminate. */ +void iothread_drain_all(void); + /** Helper template */ template<typename T> int iothread_perform(int (*handler)(T *), void (*completionCallback)(T *, int), T *context) { |