MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Reentrant Functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29473] Re: [mg29450] Re: Reentrant Functions
  • From: "Hermann Schmitt" <schmitther at netcologne.de>
  • Date: Thu, 21 Jun 2001 01:56:48 -0400 (EDT)
  • References: <9gn6oo$eof$1@smc.vnet.net> <200106200836.EAA17681@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,
I think, I mean with "reentant" that, what you mean with "recursive",
perhaps my meaning is wrong.
What manual do you mean?
I think I have now overcome my problems with reentrant i.e. recursive
functions.
Hermann Schmitt

----- Original Message -----
From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
To: mathgroup at smc.vnet.net
Subject: [mg29473] [mg29450] Re: Reentrant Functions


> Hi,
>
> a) functions must reentrant in a multi-thread application
>    with more than one program thread. A C-function with
>    some static local data is not, a C-function that access
>    some global data is not. Mathematica has not support
>    for threads (it has MathLink). So you can't make reentrant
>    functions  because you can only access a single thread.
>    The reentrance problem arises when the same function is
>    called from two different program
>    threads at the same time (this is not recursive) and
>    this cause trouble with the access of the static data.
>    The same applys to functions that access a certain hardware
>    port directly.
>
> b) if you mean *recursive* functions, yes Mathematica's function
>    can be recursive. However recursion has nothing to do
>    with reentrance, because a recursive function can be non-reentrant
>    (a factorial that save the first 30 computed values in a static
>     table)
> c) you should found out *what* you mean.
> d) the manual has a complete description of recursive
>    programing -- why not read this book ?
>
> Regards
>   Jens
>
>
> Hermann Schmitt wrote:
> >
> > Hello,
> > can functions be made reentrant, i.e. can I invoke in a function the
> > same function again?
> > Hermann Schmitt
>



  • Prev by Date: Re: How to use Rules on Sequences?
  • Next by Date: Re: MathLink and MPI
  • Previous by thread: Re: Reentrant Functions
  • Next by thread: RE: Reentrant Functions