TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
"Beard, Frank" <[log in to unmask]>
Fri, 27 Oct 2000 12:52:28 -0400
text/plain (81 lines)
Stephen,

I understand what you're saying, but I assumed they had reasons
for wanting the parallelism, since they asked about tasks versus
DLLs (which probably should have been tasks versus threads, since
threads in DLLs can be tricky).  There isn't enough information in
the original e-mail to determine whether or not tasking is warranted.

If you need a port manager and something else as a data processor,
maybe also a user interface for display and/or determination, then
it could very well be a tasking situation.  But if it's a serial
approach, where you receive the data, do something with it, and
get the next data from the port only after you're done processing
the previous data, then it wouldn't warrant tasking.

I was trying to answer the question from within the context of
which I thought it was being asked.  Apparently, I wasn't the
only one who thought so, but you do have a good point.

Frank

-----Original Message-----
From: Stephen Leake [mailto:[log in to unmask]]
Sent: Friday, October 27, 2000 9:10 AM
To: [log in to unmask]
Subject: Re: Linked List sharability.


Stephane Richard <[log in to unmask]> writes:

> Hello again everyone,
>
> I am trying to decide between to different designs that will accomplish
> the same task.  And I was just wondering if it was possible (or even
> recommended) to do.
>
> Here's the situation via an example:
>
> - I wish to have a wrapper object that will manage a linked list of data.
>
> - I have an object that will need to call upong the Wrapper object's
> methods to insert, delete and manipulate data inside that linked list.
>
> - I have another object that will need to take the contents of the wrapper
> object's linked list and process them.
>
> - Finally I have another object that will need to take the processed
> linked list and send it say to a serial port.

All fairly clear, if high level.

> In essense, I'm assuming I can do this be either declaring 3 dlls
> for each of those objects plus the dll for the wrapper object with
> the linked list making the methods open to the outside world.

Why a dll? Why not just a package? Are the "objects" not written in Ada?

> Or I can declare a bunch of Tasks that could potentially be a task
> for each of the jobs I need done on the linked lists and execute
> them asynchroneously in a controlled environment.

Tasks are for asynchronous events. Packages are for defining objects.
You have not described any asynchronous events, so tasks are not
appropriate.

> Only 2 criteria for making this decision.
>
>    1. I would like the most speed possible.
>    2. The most reliable possible.

Write everything in Ada, link them all into one executable. Use
packages with tagged types to define objects.

> Which method would you recommend?

For an example linked list, see my web page:
http://users.erols.com/leakstan/Stephe/Ada/sal.html

--
-- Stephe

ATOM RSS1 RSS2