Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[C/C++] pthread parallel execution

Name: Anonymous 2007-08-17 21:38 ID:4NoCXfyk

Just started learning to use POSIX threads, but I find that every time I create a thread and/or join it, the calling thread halts until the called thread completes its iteration. How do I execute them parallel to one another?

Thanks.

Name: Anonymous 2007-08-17 22:10 ID:kRXGqyPR

>>10
I'm not sure I quite understand the problem. How do you know it isn't running parallel to the main thread? There's no reason why it wouldn't. It also shouldn't be blocking, unless you call pthread_join (when the main thread is killed, all child threads spawned will be reaped by OS automatically)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List