Reply To: Sharing globals btwn conns in outbound tcl interpreter

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Sharing globals btwn conns in outbound tcl interpreter Reply To: Sharing globals btwn conns in outbound tcl interpreter

#57585
Dennis Pfeifer
Participant

One ‘way’ to share the globals across ‘outbound’ connections,

is to place the proc in the “Xlate Route Details” in the “Post Proc” field.

Then .. both instances share globals because they are in the same TCL interpreter.

take care, as ALL Xlates in the process will also have this global.

i.e. don’t re-use global names in the Pre Proc or Post Proc if they are in the same process. (unless you really want them to share across connections)

.. just an explanation, each thread has one instance of the TCL interpreter.

.. so each connection thread has it’s own interpreter.

.. there is, however, only one translate thread per process, hence .. all Xlates in a process share the same globals ..

(I haven’t tested this on 5.X .. but .. I don’t think that the design has changed …)

If someone tests this .. please let the group know ..

Dennis

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10