Re: concurrend tcl evaluation



MartinLemburg@UGS wrote:
> How does the tcl interpreter work, that he doesn't become confused of
> working on a script, and than suddenly he has to evaluate something
> different, to come back afterwards to continue evaluating the script?

The routines Tcl_SaveResult() / Tcl_RestoreResult() are used
appropriately to keep "concurrent" uses of a Tcl_Interp from
stomping on each other.

Note that code written for Tcl 8.5 should prefer to use
Tcl_SaveInterpState() / Tcl_RestoreInterpState().

> Can this "concurring" tcl evaluations influence each other?

If third-party C code fails to use the above routines properly, yes.
That's a bug that would need fixing.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@xxxxxxxx Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
.



Relevant Pages

  • Re: Key-passing from PHP to TCL CGI script - how is it done (web security issue)?
    ... TCL v.8.3 ... set hasEnteredTrivia 0 ... # NEW 8/7/2004 USE PHP (AS CGI) TO CHECK IF USER IS ATTEMPTING TO ENTER ... # USE REMOTE PHP SCRIPT TO CHECK FOR REPOSTING ...
    (comp.lang.tcl)
  • embedded Tcl performance -- how to make it faster?
    ... My application already provides a limited scripting language to our ... I set off to embed Tcl. ... (Embedded Ruby ... and then retrieve results back in the app once the script ...
    (comp.lang.tcl)
  • Expect: interact and buffering?
    ... with the tcl application and terminated it. ... remaining output would display and the Expect script would end. ... I have changed the interact in an attempt to make it process character ...
    (comp.lang.tcl)
  • Re: No argv, argc for worker thread
    ... I expected that a Tcl interpreter started in any manner would accept options ... This is how the interpreter works with command line options ... a "main" script processes command line ...
    (comp.lang.tcl)
  • Re: Functional programming versus TCL-like strings rant
    ... > Someone suggested that using combinations of custom-built control ... I assume you mean a script built up at ... In a language like Tcl, ... * Tcl uses a limited form of lexical/static scoping for commands ...
    (comp.lang.tcl)