🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #1787

Re: Task synchronization

#1787
From: Andy Heffernan
Date: Sun, 22 Oct 1989 20:56
19 lines
1147 bytes
In article <8230@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes:
>In article <483@glyph.UUCP> ahh@glyph.UUCP (Andy Heffernan) writes:
>>	while (FindTask(task_name)) ;    /* No raciness */
>>
>>	< deallocate stack and Task >
>
>	Matt showed a very good way.  My comment is on your FindTask()
>busy-loop: this is VERY nasty to the system, as FindTask(name) must
>Disable() in order to search the task lists.

No argument on the nastiness -- that's why I asked.

What I wound up doing is having the initiating process issue the kill
message, and having the task code (upon receipt of the message)
clean up, Forbid(), and then ReplyMsg().  The initiating process
gets kicked loose once RemTask() finishes, and then it goes and
cleans itself up.

Kosher?
Technical Details
Message-ID: <486@glyph.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!glyph!ahh
References: <483@glyph.UUCP> <8230@cbmvax.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!glyph!ahh
From: ahh@glyph.UUCP (Andy Heffernan)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Task synchronization
Keywords: boffin
Message-ID: <486@glyph.UUCP>
Date: 22 Oct 89 20:56:40 GMT
References: <483@glyph.UUCP> <8230@cbmvax.UUCP>
Reply-To: ahh@glyph.UUCP (Andy Heffernan)
Organization: Tiffany Fan Club Headquarters
Lines: 19