[Prev] [Contents] [Next]

Threads don't necessarily start before pthread_create() returns.

A thread may or may not start running prior to the return from pthread_create(). Depending on the amount of time left in the creating threads timeslice and the other activity on the system, the creating thread may return before the new thread runs.

Some systems thread implementations guarantee a certain ordered behavior for thread creation vs. the execution of the first statement in the new thread. On the AS/400, it is indeterminate which happens first, the execution of the first instruction in the new thread, or the return from pthread_create().



[Prev] [Contents] [Next]
Copyright © 1998, IBM Corporation. All rights reserved.
Comments? Contact
rchthrds@us.ibm.com