On 07/03/2012 06:22 PM, MORITA Kazutaka wrote: > If we detach the thread just after it starts, isn't it better to > create it in a detached state using pthread_attr_setdetachstate? why better? It cost several more lines to init attr and destroy it. what is benefit using attr over pathread_detach()? Thanks, Yuan