summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rototiller.c7
-rw-r--r--src/rototiller.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/rototiller.c b/src/rototiller.c
index 18f0376..2a3d45c 100644
--- a/src/rototiller.c
+++ b/src/rototiller.c
@@ -75,6 +75,13 @@ int rototiller_init(void)
}
+/* wait for all threads to be idle */
+void rototiller_quiesce(void)
+{
+ threads_wait_idle(rototiller_threads);
+}
+
+
void rototiller_shutdown(void)
{
threads_destroy(rototiller_threads);
diff --git a/src/rototiller.h b/src/rototiller.h
index fde7d43..56e1a90 100644
--- a/src/rototiller.h
+++ b/src/rototiller.h
@@ -26,6 +26,7 @@ typedef struct rototiller_module_t {
} rototiller_module_t;
int rototiller_init(void);
+void rototiller_quiesce(void);
void rototiller_shutdown(void);
const rototiller_module_t * rototiller_lookup_module(const char *name);
void rototiller_get_modules(const rototiller_module_t ***res_modules, size_t *res_n_modules);
© All Rights Reserved