|
Boost Users : |
Subject: Re: [Boost-users] mix usage of boost.thread and pthread?
From: Hua Su (huas.su_at_[hidden])
Date: 2010-01-30 01:22:25
On Sat, Jan 30, 2010 at 7:37 AM, Anthony Williams <anthony.ajw_at_[hidden]>wrote:
> Hua Su <huas.su_at_[hidden]> writes:
>
> > Is it OK to use both pthread and boost.thread in the same program under
> linux?
>
> Yes.
>
> > 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..
>
> That's fine.
>
Another reply of this topic by OvermindDL1 said "things like this_thread
will not work on non Boost.Threads". Could you give any explanation about
this?
>
> > 2. use boost.thread api to create/join/detach/interrupt thread but use
> pthread
> > api to do thread synchronization.
>
> And that's fine too.
>
> Anthony
> --
> Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/
> just::thread C++0x thread library http://www.stdthread.co.uk
> Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
> 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net