aboutsummaryrefslogtreecommitdiffhomepage
path: root/iothread.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-27 19:46:15 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-27 19:46:15 -0800
commitcf54ad8242056ae6d686fa6455b24427f4411e18 (patch)
treea1cc4a8bec1d1688114a19b07a1b29e6b7f9b361 /iothread.h
parentfdfa5c06028d3473f57cea497a6682a8e550352f (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.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/iothread.h b/iothread.h
index 7619501a..fe0f5300 100644
--- a/iothread.h
+++ b/iothread.h
@@ -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) {