On Fri, Jan 29, 2010 at 11:26 AM, Hua Su <
huas.su@
gmail.com> wrote:
> Hi all,
> Is it OK to use both pthread and boost.thread in the same program under
> linux? E.g., there are two cases:
> 1. use pthread api to create/join/detach/cancel threads but use
> boost.thread's mutex/condition_variable etc. to do thread synchronization,
> and this_thread/sleep/get_id/thread_local_storage etc..
> 2. use boost.thread api to create/join/detach/interrupt thread but use
> pthread api to do thread synchronization.
> I know boost.thread is a pthread api wrapper under linux, but I'm afraid of
> that the two cases above aren't safe if boost.thread uses some tricks I
> don't understand.
> Would you kindly give any hints?