comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Parallel Text Corpus Processing with Ada?
Date: Thu, 15 Nov 2007 10:39:59 +0100
Date: 2007-11-15T10:39:59+01:00	[thread overview]
Message-ID: <87k5oj3l00.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 1195083519.791396.162260@22g2000hsm.googlegroups.com

braver writes:
> On Nov 14, 1:45 am, Simon Wright <simon.j.wri...@mac.com> wrote:
>> You did spot that Ada.Containers aren't task-safe? (ie, you need to
>> lock the containers yourself ...)
>
> Man, that's a problem!  What about BCs, are they task-safe?  What do
> folks do to use Ada.Containers in a tasking setup, and why on Earth
> would they be in a standard and contardict some other chapters such
> as the tasks?

They do not contradict the tasking; on the contrary they are
orthogonal to tasking.  This way, if you do not need tasking, the
containers do not force you to pay the price of tasking.

You can wrap a container in a protected object if you want concurrent
access.  Alternatively, you can have one container per task (private
to that task, so not protection needed).  Before starting each task,
you Move elements into that task's private container.

-- 
Ludovic Brenta.



  reply	other threads:[~2007-11-15  9:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-10 23:05 Parallel Text Corpus Processing with Ada? braver
2007-11-11  0:11 ` tmoran
2007-11-11  1:10 ` Georg Bauhaus
2007-11-11  8:23 ` Dmitry A. Kazakov
2007-11-11 15:54   ` Georg Bauhaus
2007-11-11 16:13     ` Georg Bauhaus
2007-11-12 13:31     ` Dmitry A. Kazakov
2007-11-12 15:07       ` Georg Bauhaus
2007-11-12 16:11         ` Dmitry A. Kazakov
2007-11-11 22:49   ` braver
2007-11-12 16:17     ` Dmitry A. Kazakov
2007-11-13 22:45     ` Simon Wright
2007-11-14 23:38       ` braver
2007-11-15  9:39         ` Ludovic Brenta [this message]
2007-11-15 11:12           ` Dmitry A. Kazakov
2007-11-15 21:11         ` Simon Wright
2007-11-17  1:05           ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox