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: 1 2007-08-17 22:12 ID:4NoCXfyk

>>12
The actual application constantly outputs to the console. I'm not using pthread_join, and when that thread is triggered, all output ceases, and the application doesn't respond to any input (from its sockets). This can only mean that the thread it is executing with pthread_create, which contains the infinite loop specified above specifically for testing if it's running parallel, is blocking the main thread's execution until it completes its iteration.

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