Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!nuchat!sugar!peter
From: peter@sugar.UUCP (Peter da Silva)
Newsgroups: comp.sys.amiga
Subject: Re: Spawning tasks which draw . . .
Message-ID: <1241@sugar.UUCP>
Date: Mon, 7-Dec-87 07:33:09 EST
Article-I.D.: sugar.1241
Posted: Mon Dec  7 07:33:09 1987
Date-Received: Sun, 13-Dec-87 01:43:28 EST
References: <787@rocky.STANFORD.EDU> <6570006@hpindda.HP.COM>
Organization: Sugar Land UNIX - Houston, TX
Lines: 18

>  >*   If the blitter is allocated when the RemTask() is executed, it
>  >*   will stay allocated and the system will lock up. To fix, simply
>  >*   Forbid()/Permit() around all the blitter using sections...
> Wouldn't it be nice, if instead of doing a Forbid/Permit and locking out
> the multitasking feature of the Amiga, have a pair of routines, something
> like SetCritical/ResetCritical, which wouldn't allow a task to be aborted...

Even better: why don't you and your task use semaphores or signals
to let the parent task know when it can remove the child task.

Here's a scenario that works out just fine in real life: The parent
sends the child a message. The child does its work and sends the message
back. Then the parent RemTask()s the child.

Just like the WorkBench does it.
-- 
-- Peter da Silva  `-_-'  ...!hoptoad!academ!uhnix1!sugar!peter
-- Disclaimer: These U aren't mere opinions... these are *values*.