From: tmoran@acm.org
Subject: Re: [newbie question] tasks and protected types
Date: Fri, 29 Apr 2005 02:25:48 -0500
Date: 2005-04-29T02:25:48-05:00 [thread overview]
Message-ID: <5budnQWp7sjhfOzfRVn-iA@comcast.com> (raw)
In-Reply-To: 1114747457.868019.93210@f14g2000cwb.googlegroups.com
1) Msg is a zero length string. But you try to store Str in it, which
will only work if Str is also a null string. This is one of those few
places in Ada where you really are forced to use an access type and
a "new" (unless somebody has a better idea).
2) G is a single object accessed simultaneously by two tasks. Who
knows what unpleasantness may result.
3) Your output file is also a single object accessed simultaneously by
two tasks. You may be lucky and have that work for a while, or you
may not be lucky.
When compiled and run with Janus Ada I get:
** Unhandled CONSTRAINT_ERROR
Array length check failed
On Line Number 34 In MANAGE.DOOR.START
Called from line number 29 In MANAGE.DOOR
## Reraised On Line Number 51 In MANAGE
**** DEADLOCK DETECTED; program halted ****
next prev parent reply other threads:[~2005-04-29 7:25 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-29 4:04 [newbie question] tasks and protected types fabio de francesco
2005-04-29 7:25 ` tmoran [this message]
2005-04-29 9:43 ` Jacob Sparre Andersen
2005-04-29 10:34 ` Alex R. Mosteo
2005-04-29 11:23 ` Jacob Sparre Andersen
2005-04-29 12:18 ` Adrien Plisson
2005-04-29 12:45 ` Ada.Text_IO and protected objects (Was: [newbie question] tasks and protected types) Jacob Sparre Andersen
2005-04-29 13:22 ` Poul-Erik Andreasen
2005-04-29 14:26 ` Egil H. H�vik
2005-04-29 20:28 ` Jacob Sparre Andersen
2005-04-29 20:39 ` Randy Brukardt
2005-04-29 21:23 ` Lionel Draghi
2005-04-29 22:11 ` fabio de francesco
2005-04-30 3:45 ` Jeffrey Carter
2005-04-30 7:21 ` Lionel Draghi
2005-05-02 8:11 ` Jean-Pierre Rosen
2005-04-30 12:47 ` Ada.Text_IO and protected objects Stephen Leake
2005-04-29 21:57 ` Ada.Text_IO and protected objects (Was: [newbie question] tasks and protected types) fabio de francesco
2005-04-30 9:07 ` Ada.Text_IO and protected objects Jacob Sparre Andersen
2005-04-30 10:21 ` Dmitry A. Kazakov
2005-05-02 10:41 ` fabio de francesco
2005-05-02 14:10 ` Jacob Sparre Andersen
2005-05-02 16:29 ` fabio de francesco
2005-04-29 15:23 ` Ada.Text_IO and protected objects (Was: [newbie question] tasks and protected types) Björn Lundin
2005-04-29 12:54 ` [newbie question] tasks and protected types Alex R. Mosteo
2005-04-29 10:47 ` fabio de francesco
2005-04-29 11:33 ` Jacob Sparre Andersen
2005-04-29 12:55 ` Alex R. Mosteo
2005-04-29 14:06 ` Egil H. H�vik
2005-04-29 14:12 ` Egil H. H�vik
2005-04-29 16:23 ` Robert A Duff
2005-04-29 20:19 ` Jacob Sparre Andersen
2005-04-30 11:58 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox