changeset 93:71cae6a9a299

iothread: provide a way to join the iothread Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Tue, 23 Feb 2021 07:55:55 -0500
parents c71c6a44e69f
children 7e07763a98a7
files iothread.c iothread.h
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/iothread.c	Mon Feb 22 18:08:23 2021 -0500
+++ b/iothread.c	Tue Feb 23 07:55:55 2021 -0500
@@ -303,3 +303,8 @@
 
 	return xthr_create(&io_thread, iothread_reader, NULL);
 }
+
+int iothread_join(void)
+{
+	return xthr_join(io_thread, NULL);
+}
--- a/iothread.h	Mon Feb 22 18:08:23 2021 -0500
+++ b/iothread.h	Tue Feb 23 07:55:55 2021 -0500
@@ -29,5 +29,6 @@
 
 extern int iothread_start(int ifile, FILE *lfile, bool verbose,
 		          bool poll_version);
+extern int iothread_join(void);
 
 #endif