Re: Parallel Text Corpus Processing with Ada?



"Simon Wright" <simon.j.wright@xxxxxxx> wrote in message
news:m2oddvw6xn.fsf@xxxxxxxxxx
braver <deliverable@xxxxxxxxx> writes:

On Nov 14, 1:45 am, Simon Wright <simon.j.wri...@xxxxxxx> 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?

At one point the BCs followed their original C++ source by providing a
couple of synchronised forms.

I found that for any serious use I couldn't find a one-size-fits-all
(well, few-sizes-fit-all perhaps) approach that let me build real
apps. Iterators were one problem, applications where the data
structure involves multiple containers was another. I did consider
some shared-mutex schemes (would have involved something like
constraining container instances by access Mutex'Class or some
such). But on the whole it seemed that it would be better to require
people to but the protection _they_ need round their data.

Which is the same reason that the standard Ada containers don't allow
multiple tasks accessing a single container. (Nor does any other Ada
predefined library, for that matter. This is the standard behavior of Ada
predefined libraries - see RM A(3) - that's paragraph 3 at the beginning of
Annex A - there is nothing specific to containers here.)

There is some work going on to provide some for of "protected" containers,
but it is not clear what or when that will come to fruition.

Randy.


.



Relevant Pages

  • Re: Properties
    ... You can do this with the Ada containers. ... You want a reference to the widget ... because we are using the VCL quite heavily. ...
    (comp.lang.ada)
  • Re: Booch Components question
    ... the Standard ones added in Ada 2005. ... Even if they have to use Ada 95, ... Using these containers means that they will be available on future ... I realize that would add some confusion vis-a-vis your ...
    (comp.lang.ada)
  • Re: Mneson use experience, limits
    ... Call it SCOPE, for Signatured COntainers ... The main motivation is the prospect of using SCOPE together with the concurrency and distributed features of Ada to make an elegant and reliable database engine inherently more appropriate for Ada applications than any binding to an external C library. ... all allocation, writing and reading primitive operations replaced by cell operations, or by operations of a container based on ... A persistence container is obtained by instantiation with the cell packages of the required persistence levels. ...
    (comp.lang.ada)
  • Re: Booch Components question
    ... Ada 95, they can use the Ada 2005 components with a few small ... containers will limit instantiations and call-backs to library-level, ... starting a new project would just go for the standard Containers. ... feature that if there are no more cursors pointing to a part of the ...
    (comp.lang.ada)
  • Re: Containers - nontrivial element access
    ... There is a record type with a couple of fields ... What would you suggest as the Ada solution for this problem? ... I don't think that's reproducible as-is with the standard containers. ... so you can have dangling cursors but no dangling pointers. ...
    (comp.lang.ada)