From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Task reschedule
Date: 05 Aug 2002 12:03:14 -0400
Date: 2002-08-05T16:11:46+00:00 [thread overview]
Message-ID: <ulm7lfg3h.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: ails2j$b2q$1@rdel.co.uk
Gruntfuggly <nigel.scott@uk.thalesgroup.com> writes:
> I've always believed that 'delay 0.0' should cause a task reschedule.
> However, it appears that my compiler simply optimizes the statement
> out.
>
> Is there another way I can force the reschedule? I don't want to have
> to put it a '0.02', but if I put in a line of Text_IO instead, that
> gives me the correct functionality...
If you give each task a distinct priority, the highest priority one
will run when it is ready.
Or you can enable time-slicing, if you don't actually care where the
task switch happens.
If you are using a round-robin scheme, you'll have to use an OS call
to put the current task to sleep.
It seems odd to not use time-slicing for this. If you actually care
where the task switch happens, you should use a rendezvous or
protected object to force the task synchronization.
--
-- Stephe
next prev parent reply other threads:[~2002-08-05 16:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-05 12:46 Task reschedule Gruntfuggly
2002-08-05 15:24 ` David C. Hoos, Sr.
2002-08-05 16:54 ` tmoran
2002-08-05 16:03 ` Stephen Leake [this message]
[not found] <ur8hcdl53.fsf@gsfc.nasa.gov>
[not found] ` <YlT39.326$_R5.28416290@newssvr13.news.prodigy.com>
[not found] ` <aiqipm$jre$1@rdel.co.uk>
2002-08-14 3:19 ` 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