home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17725 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1009 b 

  1. Path: sparky!uunet!mcsun!news.funet.fi!ajk.tele.fi!funic!sauna.cs.hut.fi!cs.hut.fi!jtp
  2. From: jtp@cs.hut.fi (Jukka Partanen)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: LockIBase
  5. Date: 23 Dec 1992 00:55:28 GMT
  6. Organization: Helsinki University of Technology, Finland
  7. Lines: 24
  8. Distribution: comp
  9. Message-ID: <JTP.92Dec23025528@laphroaig.cs.hut.fi>
  10. NNTP-Posting-Host: laphroaig.cs.hut.fi
  11.  
  12.  
  13.     What's the correct locking protocol if one wants to find a
  14.     particular screen, and then do something with it? The RKM
  15.     states that one shouldn't call any high level calls while
  16.     holding the IntuitionBase lock.
  17.  
  18.     Currently I'm using
  19.  
  20.     LockIBase();
  21.     Find_The_Screen;
  22.     Forbid();          /* so it won't be closed */
  23.     UnlockIBase();
  24.     Do_The_Magic_Involving_High_Level_Calls;
  25.     Permit();
  26.  
  27.     but this seems very ugly to me. Isn't there a better way to
  28.     make sure that a particular screen (not necessarily a public
  29.     screen) isn't closed while I'm referencing it?
  30.  
  31.     Thanks,
  32.     jtp
  33.  
  34. Zippy quotation:
  35. - if it GLISTENS, gobble it!!
  36.