From: "Alex R. Mosteo" <alejandro@mosteo.invalid>
Subject: Re: C++ primer on multithreading
Date: Wed, 20 Apr 2011 15:04:06 +0200
Date: 2011-04-20T15:04:06+02:00 [thread overview]
Message-ID: <iomlk6$hii$1@dont-email.me> (raw)
In-Reply-To: b580ca70-3401-4bf5-9700-663201657395@z31g2000vbs.googlegroups.com
Maciej Sobczak wrote:
> On Apr 20, 12:45 pm, "Alex R. Mosteo" <alejan...@mosteo.invalid>
> wrote:
>
>> I need to do some multi-threading stuff, in the sense that I will need
>> the equivalent of a protected object with some conditional blocking
>> entries.
>
> This is not enough. What are you going to do with these entries? How
> many threads will use the same entry? How many entries will be used at
> a time by a single thread?
Not many threads involved, and I have been really not very explicit.
Basically I need a protected queue with blocking semantics; several
writters, one consumer.
Also more generally, I wondered too if there's some ready-to-use protected
stuff in C++ that spares me dealing with mutexes to emulate a synchronized
interface.
> If you don't try to reimplement the Ada semantics in full (select
> statement, requeue, anyone? :-) ), then conditional variables are
> sufficient to implement typical multithreading patterns - this can be
> nicely encapsulated by the "protected object" interface.
No, I don't want the full boat :) Also I wouldn't want to fall in the
inverse trap of what's so frequently touted here of writing C in Ada. So any
pointers on what are considered best practices nowadays in C++ for
multithreading are welcome too.
> Boost is a good quality wrapper for system services and therefore
> useful for portability, but brings a whole lot of dependencies with it
> - it might or might not be of concern.
That's no problem. I will be using stock debian systems, so as long as it's
there...
Alex.
>
> --
> Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com
next prev parent reply other threads:[~2011-04-20 13:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 10:45 C++ primer on multithreading Alex R. Mosteo
2011-04-20 11:23 ` Peter C. Chapin
2011-04-20 13:06 ` Alex R. Mosteo
2011-04-20 11:32 ` Dmitry A. Kazakov
2011-04-20 12:00 ` Maciej Sobczak
2011-04-20 13:04 ` Alex R. Mosteo [this message]
2011-04-20 14:34 ` Georg Bauhaus
2011-04-20 20:44 ` Maciej Sobczak
2011-04-21 8:50 ` Alex R. Mosteo
2011-04-21 6:58 ` Dmitry A. Kazakov
2011-04-21 21:03 ` Maciej Sobczak
2011-04-22 8:38 ` Dmitry A. Kazakov
2011-04-22 21:45 ` Maciej Sobczak
2011-04-23 6:51 ` Dmitry A. Kazakov
2011-04-23 21:35 ` Maciej Sobczak
2011-04-24 7:42 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox