home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5444 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.3 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!a2i!shakala!donh
  2. From: donh@shakala.com (Don Hackler)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: Windows execution flow question
  5. Message-ID: <mki1XB11w165w@shakala.com>
  6. Date: Tue, 26 Jan 93 17:41:57 PST
  7. References: <727043519snz@chrism.demon.co.uk>
  8. Organization: Shakala BBS (ClanZen Radio Network) Sunnyvale, CA 408-734-2289
  9. Lines: 40
  10.  
  11. chris@chrism.demon.co.uk (Chris Marriott) writes:
  12.  
  13. > In article <1j33gi$6dp@agate.berkeley.edu> jeff@emily10.Berkeley.EDU writes:
  14. > >        I have a question about Windows program execution flow.  I am
  15. > >a little confused so my question may sound confused, but that may
  16. > >not be too bad, because perhaps the form of my confusion will clue
  17. > >you in to what I am confused about...get it?  Probably this question
  18. > >is very naive and that is both because I am a beginner programmer and
  19. > >because I use OWL which hides a lot of the real nuts and bolts of
  20. > >program execution.  (That, I am discovering, has its pluses and minuses)
  21. > >
  22. > >        Lets say I have a function which is dispatched by a Windows
  23. > >message, and that function has some variable X.  Now this function passes th
  24. > >address of X to some other function for processing the contents of X.
  25. > >Let's say I receive the initial Windows message again.  Will the new message
  26. > >dispatch my function, redefining X, and changing the contents of the adress
  27. > >sent to the secondary function before it is done processing it?
  28. > >
  29. > >        Or does a window wait until all processing is finished before
  30. > >handling the next message in its queue?
  31. > >
  32. > Windows 3.x is a *non-pre-emptive* multi-tasking environment.  The processing
  33. > of one message *always* runs to completion before the next message is
  34. > retrieved and processed.
  35. > Chris
  36. > -- 
  37. Close! But no cigar!...  If the code responding to a given message
  38. yields for any reason, it's possible to have your code re-entered
  39. repeatedly.  For instance, a message box thrown up in response 
  40. to a timer message when an error condition is noted will be
  41. called repeatedly until you run out of heap/GDI/stack etc.
  42.  
  43. - don
  44.  
  45. ------------------------------------------------------------------
  46. Don Hackler  - donh@shakala.com 
  47. Shakala BBS (ClanZen Radio Network) Sunnyvale, CA 408-734-2289
  48.