home *** CD-ROM | disk | FTP | other *** search
- From: yeti@adam.com.au (jonathan potter)
- Subject: Re: MsgPorts and lists
- Newsgroups: comp.sys.amiga.programmer
- References: <1527.6618T48T2102@amiga.pp.se>
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
- NNTP-Posting-Host: eve.adam.com.au
- Message-ID: <31227335.0@eden.adam.com.au>
- Date: 14 Feb 96 23:41:41 GMT
- Path: eden.adam.com.au!not-for-mail
-
- Mikael Berglund (mikael.berglund@amiga.pp.se) wrote:
- : I read in an old AmigaTech Journal that as an owner of a message port i also
- : own the message list and that it is safe to prescan the message list and
- : even Remove() them if they are ReplyMsg():ed.
-
- You can do what you like with your message list, but if you are adding or
- removing to it other than through GetMsg() and PutMsg(), you must call
- Forbid() first.
-
- : What i obviously would want is a message lookahead that do the checking
- : without removing the message from the list in the first place. Alternatively
- : an UngetMsg() that pushes the message back. Maybe AddHead() it to the list
- : again. Is this safe and how should it be done in that case? GadTools are
- : involved hence the GT_GetIMsg().
-
- You can always PutMsg() the message to another of your tasks, or even
- back to yourself (of course this will go to the end of the list, not the
- beginning). If you must add a message to the head of a queue, call
- Forbid() and then AddHead().
-
- Jon
-
- +------------------------------------------------------------------+
- | Jonathan Potter yeti@adam.com.au +61-412-845-696 |
- +------------------------------------------------------------------+
-