summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2014-12-01 11:43:27 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2014-12-01 11:43:27 +0100
commitf2cf668e6f959b5dc266c3eb7956b9d7c74c10ab (patch)
tree3c43cbb58cdcba807deff9a148509663b23962d1
parent39572126c20624c50ec8b0c0f2b08995ac435f51 (diff)
downloadbiruda-f2cf668e6f959b5dc266c3eb7956b9d7c74c10ab.tar.gz
biruda-f2cf668e6f959b5dc266c3eb7956b9d7c74c10ab.tar.bz2
changed worker thread into a detached thread, there is no place in
the coordinator where we could join it
-rw-r--r--BUGS2
-rw-r--r--src/worker.c15
2 files changed, 4 insertions, 13 deletions
diff --git a/BUGS b/BUGS
index bcf220c..dd7185d 100644
--- a/BUGS
+++ b/BUGS
@@ -1,5 +1,3 @@
-- synchronized logger output
-
- Windows termination
^CUnexpected state: state=3 source=-2 action=1 (src/core/sock.c:943)
diff --git a/src/worker.c b/src/worker.c
index 0ef9106..1d81205 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -95,9 +95,9 @@ static void *worker_func( void *thread_data )
worker->state = WORKER_STATE_RUNNING;
- printf( "worker %s: entering glib worker main loop..", worker->name );
+ printf( "worker %s: entering glib worker main loop..\n", worker->name );
g_main_loop_run( wed->main_loop );
- printf( "worker %s: leaving glib worker main loop..", worker->name );
+ printf( "worker %s: leaving glib worker main loop..\n", worker->name );
worker->state = WORKER_STATE_STOPPED;
@@ -127,6 +127,8 @@ int worker_init( worker_t *worker )
if( res != 0 ) {
return 1;
}
+
+ pthread_detach( wed->thread );
return 0;
}
@@ -147,14 +149,5 @@ void worker_terminate( worker_t *worker )
int worker_free( worker_t *worker )
{
- direct_glib_execution_worker_data_t *wed = (direct_glib_execution_worker_data_t *)worker->execution_data;
- void *result;
- int res;
-
- res = pthread_join( wed->thread, &result );
- if( res != 0 ) {
- return 1;
- }
-
return 0;
}