From: Anh Vo <anhvofrcaus@gmail.com>
Subject: Re: Tasking troubles, unexpected termination.
Date: Fri, 2 Nov 2012 09:02:39 -0700 (PDT)
Date: 2012-11-02T09:02:39-07:00 [thread overview]
Message-ID: <8dd51098-9088-451f-92e1-7535e4c63b4d@googlegroups.com> (raw)
In-Reply-To: <5d418014-3796-422d-9393-6ee1c65746a5@googlegroups.com>
On Tuesday, October 30, 2012 7:59:33 PM UTC-7, Shark8 wrote:
> The following edit gives expected behavior: -------------------------------------------------------------- For Index in 1..10 loop declare Use Ada.Calendar; Function Alert Return Ada.Calendar.Time is ( Now + Duration(1.5*Index) ); -- Removed Item declaration in favor of building in-place. begin K.Add( Event => New Notification'( Message => + ("DD"&Positive'Image(Index)), -- Expire at Now and 3*Index seconds. Expiry => New Time'( Alert ) ) ); end; end loop; -------------------------------------------------------------- Though this raises the question of why the other behavior is executed with: Item : Notification:= Notification'( Message => + ("DD"&Positive'Image(Index)), -- Expire at Now and 3*Index seconds. Expiry => New Time'( Alert ) ); [...] K.Add( Event => New Notification'(Item) );
I do not have a good feeling to see these forms do not behave the same way. Thus, I made an initial investigation to see why. I am certain that it has to do with the way Expiry stored in the vector or how this value is extracted during iteration. I will investigate deeper when time permits.
next prev parent reply other threads:[~2012-11-02 16:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 22:03 Tasking troubles, unexpected termination Shark8
2012-10-30 23:01 ` Adam Beneschan
2012-10-31 1:05 ` Anh Vo
2012-10-31 2:17 ` Shark8
2012-10-31 2:59 ` Shark8
2012-11-02 16:02 ` Anh Vo [this message]
2012-11-01 9:39 ` AdaMagica
2012-11-02 1:18 ` Shark8
2012-11-02 16:43 ` Adam Beneschan
2012-11-02 16:51 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox