Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Seeking feedback on C++ ZThreads: good or bad experiences (vs Boost, pthreads, etc)?

Reply
Thread Tools

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

 
 
Matt England
Guest
Posts: n/a
 
      01-30-2007
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/...nnik/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
 
Reply With Quote
 
 
 
 
Matt England
Guest
Posts: n/a
 
      01-30-2007
To email me directly, please remove the "downwithspammers-" text.

-Matt

On Tue, 30 Jan 2007 17:33:48 -0600, Matt England
<(E-Mail Removed)> 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/...nnik/zsim/doc/

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      01-31-2007
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.
 
Reply With Quote
 
Howard Hinnant
Guest
Posts: n/a
 
      01-31-2007
In article <(E-Mail Removed)>,
Matt England <(E-Mail Removed)> 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/...nnik/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
 
Reply With Quote
 
Roland Pibinger
Guest
Posts: n/a
 
      01-31-2007
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
 
Reply With Quote
 
Z.Meson@gmail.com
Guest
Posts: n/a
 
      01-31-2007
On Jan 30, 6:36 pm, Howard Hinnant <(E-Mail Removed)> wrote:
> Matt England <(E-Mail Removed)> 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

 
Reply With Quote
 
Z.Meson@gmail.com
Guest
Posts: n/a
 
      01-31-2007
On Jan 31, 7:44 am, (E-Mail Removed) 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.)"

 
Reply With Quote
 
n.torrey.pines@gmail.com
Guest
Posts: n/a
 
      02-02-2007
On Jan 30, 6:36 pm, Howard Hinnant <(E-Mail Removed)> wrote:
> In article <(E-Mail Removed)>,
> Matt England <(E-Mail Removed)> 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/...nnik/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.

 
Reply With Quote
 
n.torrey.pines@gmail.com
Guest
Posts: n/a
 
      02-02-2007
On Jan 30, 6:36 pm, Howard Hinnant <(E-Mail Removed)> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Asus P5QC motherboard. Any good/bad experiences? Squiggle NZ Computing 0 03-29-2009 07:56 AM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 12 02-23-2005 03:28 AM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 0 02-19-2005 01:10 AM
Seeking practical experiences of CIS for Epson 2100 Brian Downunda Digital Photography 1 01-13-2004 10:58 AM



Advertisments