Changeset: 87083eabecd2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=87083eabecd2
Modified Files:
        monetdb5/mal/mal_dataflow.c
Branch: default
Log Message:

Fix changeset d665ecc5f37e: MT_create_thread returns whether it succeeded.
The first argument isn't even filled in when it fails, so you can't
use that to check whether MT_create_thread succeeded.


diffs (13 lines):

diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c
--- a/monetdb5/mal/mal_dataflow.c
+++ b/monetdb5/mal/mal_dataflow.c
@@ -363,8 +363,7 @@ DFLOWinitialize(void)
        todo = q_create(2048, "todo");
        limit = GDKnr_threads ? GDKnr_threads : 1;
        for (i = 0; i < limit && i < THREADS; i++) {
-               MT_create_thread(&workers[i], DFLOWworker, (void *) 
&workers[i], MT_THR_JOINABLE);
-               if ( workers[i] == 0 ) {
+               if (MT_create_thread(&workers[i], DFLOWworker, (void *) 
&workers[i], MT_THR_JOINABLE) < 0) {
                        MT_lock_unset(&mal_contextLock, "DFLOWinitialize");
                        throw(MAL, "dataflow", "Can not create interpreter 
thread");
                }
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to