From: | meyersrl |
Date: | 15 Aug 2000 at 20:11:17 |
Subject: | Re: RemTask() within own task code. |
To: amiga-c@egroups.com
cc:
Subject: Re: [amiga-c] RemTask() within own
task code.
>Hi,
> Is it legal fro a spawned task to remove itself via RemTask()
>within
>its own taskcode.
>
>Yes, and I think it mentions doing this in the RKMs too.
Yep, see exec.library/RemTask()
Briefly:
1. Deallocate all resources that the task set up for itself such as
local memory, Signals, MsgPorts, Devices, libraries etc..
2. Call RemTask(0L); This should cause the Task to remove itself and
deallocate any remaining memory including the memory holding the Task
structure itself.
Note: Be careful the Task is not doing something that could cause another
Task to Signal it after it is gone.
Bob Meyers