Seeking feedback on C++ ZThreads: good or bad experiences (vs Boost, pthreads, etc)?

Discussion in 'C++' started by Matt England, Jan 30, 2007.

  1. Matt England

    Matt England Guest

    My team currently using Boost Threads, but we are considering
    switching to ZThreads. (We seek cross-platform, C++ multithreading
    capabilities in an external library.)

    ZThread(s):

    http://zthread.sourceforge.net/
    http://www.inf.uni-konstanz.de/dbis/members/vinnik/zsim/doc/

    Can anyone share their ZThreads experience, either good, bad, or
    indifferent? If you have time, can you also contrast ZThreads with
    alternative, cross-platform threading libraries (as per:
    http://www.codeguru.com/forum/showthread.php?t=413251 ).

    Also note:

    http://www.codeguru.com/forum/showthread.php?t=413255

    Best regards,
    Matt
    --
    Dispersed Storage: http://cleversafe.org
     
    Matt England, Jan 30, 2007
    #1
    1. Advertising

  2. Matt England

    Matt England Guest

    Matt England, Jan 30, 2007
    #2
    1. Advertising

  3. Matt England

    Ian Collins Guest

    Re: Seeking feedback on C++ ZThreads: good or bad experiences (vsBoost, pthreads, etc)?

    Matt England wrote:
    > My team currently using Boost Threads, but we are considering
    > switching to ZThreads. (We seek cross-platform, C++ multithreading
    > capabilities in an external library.)
    >

    I guess the obvious question is why?

    What are your specific requirements that boost doesn't meet and ZThreads
    does?

    --
    Ian Collins.
     
    Ian Collins, Jan 31, 2007
    #3
  4. In article <>,
    Matt England <> wrote:

    > My team currently using Boost Threads, but we are considering
    > switching to ZThreads. (We seek cross-platform, C++ multithreading
    > capabilities in an external library.)
    >
    > ZThread(s):
    >
    > http://zthread.sourceforge.net/
    > http://www.inf.uni-konstanz.de/dbis/members/vinnik/zsim/doc/
    >
    > Can anyone share their ZThreads experience, either good, bad, or
    > indifferent? If you have time, can you also contrast ZThreads with
    > alternative, cross-platform threading libraries (as per:
    > http://www.codeguru.com/forum/showthread.php?t=413251 ).
    >
    > Also note:
    >
    > http://www.codeguru.com/forum/showthread.php?t=413255


    Wow, your post is most timely Matt. I'm most interested in what
    features of Boost Threads you liked and disliked, the reasons for your
    contemplating a move, and what features you are anticipating will solve
    your problems with ZThread.

    Howard Hinnant
    Library Working Group Chairman, C++ Standards Committee
     
    Howard Hinnant, Jan 31, 2007
    #4
  5. On Tue, 30 Jan 2007 17:33:48 -0600, Matt England wrote:
    >My team currently using Boost Threads, but we are considering
    >switching to ZThreads. (We seek cross-platform, C++ multithreading
    >capabilities in an external library.)


    You may also consider pthreads (C not C++) for which a Windows
    implementation is also available:
    http://sourceware.org/pthreads-win32/

    Best wishes,
    Roland Pibinger
     
    Roland Pibinger, Jan 31, 2007
    #5
  6. Matt England

    Guest

    On Jan 30, 6:36 pm, Howard Hinnant <> wrote:
    > Matt England <> wrote:
    >
    > Wow, your post is most timely Matt. I'm most interested in what
    > features of Boost Threads you liked and disliked, the reasons for your
    > contemplating a move, and what features you are anticipating will solve
    > your problems with ZThread.
    >
    > Howard Hinnant
    > Library Working Group Chairman, C++ Standards Committee- Hide quoted text -
    >


    The most obvious thing that jumps out to me is that ZThreads has more
    pre-built high-level abstractions than Boost Threads (and a few more
    low-level primitives too).

    For example, ZThreads provides the following while Boost threads does
    not:
    - Thread pools (PoolExecutor)
    - Semaphore class
    - Atomic integer

    While Boost threads' documentation mentions that the next phase will
    include more high-level concepts, Boost threads doesn't seem to have
    been updated in a 18 months.

    The good things about both libraries is that they are written in C++
    (as opposed to the pthreads library which is a C library). The thing
    that bothers me with both ZThreads and Boost threads is that neither
    support inter-process semaphores (or for that matter inter-process
    threads) nor shared memory functionality. Windows threads API and
    most implementations of pthreads (including those on Solaris, Linux
    kernels 2.6 and later, Win32 implementation of pthreads) support
    interprocess-semaphores. Windows and many POSIX implementations
    support shared memory functionality. And as far as atomic operations
    goes, ZThreads only seems to support atomic increment and decrement --
    no atomic compare and swap functionality.

    As far as naming goes and general class design, I prefer Boost
    threads. The naming conventions is more in-line with the C++ standard
    libraries and the rest of Boost. The general class design seems very
    well thought out as well. (I wouldn't have implemented many of the
    concepts in ZThreads differrently - why have a FastMutex class that
    seems to have the same interface as the plain Mutex class?) I just
    feel that Boost threads is too incomplete and that despite the promise
    made in its documentation, it hasn't really been actively worked on in
    a while.

    So, a worthy question is what do I use in applications that I have to
    write? I have resorted to writing my own cross-platform library that
    focusses more on interprocess-primitives, shared memory, and atomic
    operations as these are more important to the work that I do.

    - Kevin Hall
     
    , Jan 31, 2007
    #6
  7. Matt England

    Guest

    On Jan 31, 7:44 am, wrote:
    > support inter-process semaphores (or for that matter inter-process
    > threads)


    Forgive me... my son kept me up all night and I'm pretty tired.
    Obviously, inter-process threads doesn't make any sense.

    I meant to say:
    "(or for that matter inter-process mutexes.)"
     
    , Jan 31, 2007
    #7
  8. Matt England

    Guest

    On Jan 30, 6:36 pm, Howard Hinnant <> wrote:
    > In article <>,
    > Matt England <> wrote:
    >
    >
    >
    > > My team currently using Boost Threads, but we are considering
    > > switching to ZThreads. (We seek cross-platform, C++ multithreading
    > > capabilities in an external library.)

    >
    > > ZThread(s):

    >
    > >http://zthread.sourceforge.net/
    > >http://www.inf.uni-konstanz.de/dbis/members/vinnik/zsim/doc/

    >
    > > Can anyone share their ZThreads experience, either good, bad, or
    > > indifferent? If you have time, can you also contrast ZThreads with
    > > alternative, cross-platform threading libraries (as per:
    > >http://www.codeguru.com/forum/showthread.php?t=413251).

    >
    > > Also note:

    >
    > >http://www.codeguru.com/forum/showthread.php?t=413255

    >
    > Wow, your post is most timely Matt. I'm most interested in what
    > features of Boost Threads you liked and disliked, the reasons for your
    > contemplating a move, and what features you are anticipating will solve
    > your problems with ZThread.
    >
    > Howard Hinnant
    > Library Working Group Chairman, C++ Standards Committee



    I agree with the other poster about thread pools. As multi-core CPUs
    become increasingly common, the use of threads solely to speed up
    parallelizable processes will be prevalent. For this, having thread
    pools is essential.

    It appears that Boost.Threads is not actively developed. There was a
    DDJ article as far back as April 15, 2003 about Boost.Threads that
    mentioned that boost::thread_pool was a planned feature, but I don't
    think this feature was ever delivered.
     
    , Feb 2, 2007
    #8
  9. Matt England

    Guest

    On Jan 30, 6:36 pm, Howard Hinnant <> wrote:

    > Wow, your post is most timely Matt. I'm most interested in what
    > features of Boost Threads you liked and disliked, the reasons for your
    > contemplating a move, and what features you are anticipating will solve
    > your problems with ZThread.


    Also, for the reasons I mentioned, I think it would be nice to have a
    portable way to determine the number of CPUs/cores, to avoid spawning
    too many threads.
     
    , Feb 2, 2007
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. has
    Replies:
    0
    Views:
    288
  2. ZThreads....

    , Sep 11, 2006, in forum: C++
    Replies:
    3
    Views:
    469
    Victor Bazarov
    Sep 12, 2006
  3. IndyStef

    Boost - good or bad?

    IndyStef, Oct 17, 2006, in forum: C++
    Replies:
    14
    Views:
    829
    loufoque
    Oct 20, 2006
  4. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    455
    Fredrik Lundh
    Aug 13, 2008
  5. rantingrick
    Replies:
    44
    Views:
    1,303
    Peter Pearson
    Jul 13, 2010
Loading...

Share This Page