aboutsummaryrefslogtreecommitdiffstats
path: root/src/io_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-08-29 09:44:08 +0200
committerMax Kellermann <max@duempel.org>2011-08-29 10:25:04 +0200
commit4733c5fef00abacfbca414d96114bd7a5427ca12 (patch)
tree95fc235821277a3cbca8c84a544e680d4d115114 /src/io_thread.c
parenta97ddc8cb955eb518f1864ccc2ee86b08010a347 (diff)
downloadmpd-4733c5fef00abacfbca414d96114bd7a5427ca12.tar.gz
mpd-4733c5fef00abacfbca414d96114bd7a5427ca12.tar.xz
mpd-4733c5fef00abacfbca414d96114bd7a5427ca12.zip
io_thread: add function io_thread_quit()
Diffstat (limited to 'src/io_thread.c')
-rw-r--r--src/io_thread.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/io_thread.c b/src/io_thread.c
index 4677428d6..a0e3a8844 100644
--- a/src/io_thread.c
+++ b/src/io_thread.c
@@ -75,12 +75,19 @@ io_thread_start(GError **error_r)
}
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);
}