Opened 17 months ago

Closed 16 months ago

Last modified 14 months ago

#170 closed enhancement (fixed)

unpark new thread

Reported by: Thierry Delisle Owned by: Thierry Delisle <tdelisle@…>
Priority: minor Component: libcfa
Version: 1.0 Keywords: Park/Unpark
Cc:

Description

The following code would be convenient to have a bunch of threads "start at once"

thread MyThread { /*...*/ };
void main( MyThread & ) { park(); /*...*/ }

void foo() {
    MyThread mythreads[4];
    for(i; 4) {
        unpark(mythreads[i]);
    }
    /*...*/
}

This could be a little tricky because normally, park and unparks should be perfectly interleaved, but in this case "start, unpark, park" is similar enough to "unpark, unpark, park" that it might cause problems.

Change History (3)

comment:1 Changed 16 months ago by Thierry Delisle <tdelisle@…>

Owner: set to Thierry Delisle <tdelisle@…>
Resolution: fixed
Status: newclosed

In ff79d5e:

Fixed park unpark to support park as first step of main()
Fixes #170?

comment:2 Changed 15 months ago by Thierry Delisle <tdelisle@…>

In ff79d5e:

Fixed park unpark to support park as first step of main()
Fixes #170?

comment:3 Changed 14 months ago by Thierry Delisle <tdelisle@…>

In ff79d5e:

Fixed park unpark to support park as first step of main()
Fixes #170?

Note: See TracTickets for help on using tickets.