[comp.sys.amiga] slight bug in tasks ...

AXDRW%ALASKA.BITNET@cunyvm.cuny.edu (Don R. Withey) (05/26/89)

> From: Matt Dillon <dillon@postgres.berkeley.edu> Date: 23 May 89 05:41:52 GMT
>     Where I RemTask() I should DeleteTask()... since I used
> CreateTask() to create it in the first place!
>
I wondered about that, and then tested it.  You can RemTask() a task created
with CreateTask().  You don't lose any memory (the stack and task structure
goes away just like it should).
        Don

deven@rpi.edu (Deven Corzine) (05/26/89)

In article <16274@louie.udel.EDU> AXDRW%ALASKA.BITNET@cunyvm.cuny.edu (Don R. Withey) writes:

   > From: Matt Dillon <dillon@postgres.berkeley.edu> Date: 23 May 89 05:41:52 GMT
   >     Where I RemTask() I should DeleteTask()... since I used
   > CreateTask() to create it in the first place!
   >
   I wondered about that, and then tested it.  You can RemTask() a task created
   with CreateTask().  You don't lose any memory (the stack and task structure
   goes away just like it should).

Of course you can.  DeleteTask() is *nothing* more than a call to
RemTask().  But, for consistency's sake (and perhaps future
compatibility?) you should use DeleteTask() if you used CreateTask().

Deven
--
shadow@[128.113.10.2]   <shadow@pawl.rpi.edu> Deven T. Corzine (518) 272-5847
shadow@[128.113.10.201] <shadow@acm.rpi.edu>  2346 15th St.    Pi-Rho America
deven@rpitsmts.bitnet   <userfxb6@rpitsmts>   Troy, NY 12180-2306  <<tionen>>
"Simple things should be simple and complex things should be possible." - A.K.

hummel@m.cs.uiuc.edu (05/27/89)

Written 11:48 pm  May 25, 1989 by AXDRW%ALASKA.BIT@cunyvm.cuny.edu:
> > /* ---------- "re: slight bug in tasks ..." ---------- */
> > From: Matt Dillon  [ ... ]
> >     Where I RemTask() I should DeleteTask()... since I used
> > CreateTask() to create it in the first place!
> >
> I wondered about that, and then tested it.  You can RemTask() a task created
> with CreateTask().  You don't lose any memory (the stack and task structure
> goes away just like it should).
>         Don

    There is also a potential race condition on the variable WowItWorked.  

				< Lionel
----------
Lionel Hummel                             404 W. High St. #6, Urbana, IL 61801
University of Illinois, Urbana-Champaign  [H] (217)344-5303  [W] (217)333-7408
hummel@cs.uiuc.edu       {pur-ee,uunet}!uiucdcs!hummel            BIX: lhummel