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

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!acorn!eoe!pwestlak
  2. From: pwestlak@eoe.co.uk (Peter Westlake)
  3. Newsgroups: comp.programming
  4. Subject: Re: reentrant code
  5. Message-ID: <1484@eouk13.eoe.co.uk>
  6. Date: 21 Dec 92 18:57:50 GMT
  7. References: <1992Dec14.160110.26338@linus.mitre.org>
  8. Organization: EO Europe Limited, Cambridge, UK
  9. Lines: 34
  10. X-Newsreader: TIN [version 1.1 PL6]
  11.  
  12. Randy Crawford (crawford@boole.mitre.org) wrote:
  13. : In article <1992Dec13.221314.26971@nntpd.lkg.dec.com>, mjg@ktbush.ogo.dec.com (Michael J. Grier) writes:
  14. : > 
  15. : > In article <1992Dec13.051634.14815@linus.mitre.org>, crawford@boole.mitre.org (Randy Crawford) writes:
  16. : > |>
  17. : > |>>The problems of reentrancy are a bit different from concurrency. 
  18. : > |>
  19. : > |>True, but reentrancy is irrelevant unless concurrency in some form (like
  20. : > |>context switching) is involved.
  21. : > |>
  22. : > 
  23. : >    Untrue.  Consider a module which implements an abstraction of a queue
  24. : > or other searching structure, which provides a service for iteration on the
  25. : > data structure.  If you specify the service such that the caller provides
  26. : > a function to execute for each element in the structure, there is again
  27. : > a need for reentrancy controls of some fashion.
  28. : Only if one part of the search cannot continue to completion before another
  29. : part begins (or resumes).  This is still concurrency (or concurrent sub-
  30. : tasks) no matter how you look at it.  When you have communicating concurrent
  31. : threads/processes/tasks/contexts/callbacks, you have concurrency.
  32.  
  33. This sounds more like recursion than concurrency. Yes, there are several activations
  34. of the access function on the stack at the same time, but this does not constitute
  35. concurrency any more in this case (passing in functions to be called back) than it
  36. does when recursing by less devious means.
  37.  
  38. Peter.
  39. -- 
  40. Peter M Westlake                        EO Europe Ltd.,
  41. Tel: +44 223-843131                     Abberley House,  Granhams Road,
  42. Fax: +44 223-843032                     Great Shelford,
  43. email:  pwestlak@eoe.co.uk              Cambridge CB2 5LQ,   England
  44.