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