Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Hollywood MAL AMIStore App Store A600 Memory

AuthorTopic: Does CheckIO work with request that have already GetMessage()ed ?  (Read 731 times)

0 Members and 1 Guest are viewing this topic.

Offline Jose

Reason I'm asking is that I like my cleanup code to be the more generalistic possible, so I do a general clean up code includeed in the second part of Initialization routine, wich is called with an argument to finalize instead of initializing. This allows me to call the ini/finalization code mostly in the same manner from the rest of the routines wich simplifies things...

My current problem is I'd like to do the same with some timer related stuff and sometimes the timer requests will have already finished when I call the finalization routine other times they haven't. But what's worse is that sometimes they will have already finished but haven't been taken off the message port list, other times they have. This means I can't just Abort() and WaitIO(). So will a CheckIO() work, even if the request has already been replied and taken off the reply ports list? If so, I could use it to see if the IORequest has been replied and then take out any requests that are still at the port if it has, or Abort first if not. If CheckIO can't work in those conditions I don't the way....

\\"We made Amiga, they {bleep}ed it up\\"

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
  • Total likes: 0
    • http://www.iki.fi/sintonen/
Re: Does CheckIO work with request that have already GetMessage()ed ?
« Reply #1 on: August 19, 2005, 04:59:58 PM »
If you can use GetMsg() to get the ioreq reply then the iorequest has already terminated. Most of the time WaitIO should be used to remove the ioreq msg from the port though.

However, as long as the iorequest is used at least once it should be safe to AbortIO() + WaitIO() always (AbortIO doesn't do anything if the iorequest has already terminated).