From 4733c5fef00abacfbca414d96114bd7a5427ca12 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 29 Aug 2011 09:44:08 +0200 Subject: io_thread: add function io_thread_quit() --- src/io_thread.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/io_thread.c') diff --git a/src/io_thread.c b/src/io_thread.c index 4677428d..a0e3a884 100644 --- a/src/io_thread.c +++ b/src/io_thread.c @@ -74,13 +74,20 @@ io_thread_start(GError **error_r) return true; } +void +io_thread_quit(void) +{ + assert(io.loop != NULL); + + g_main_loop_quit(io.loop); +} + void io_thread_deinit(void) { if (io.thread != NULL) { - assert(io.loop != NULL); + io_thread_quit(); - g_main_loop_quit(io.loop); g_thread_join(io.thread); } -- cgit v1.2.3