Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 14, 2008, 12:46:00 AM (16 years ago)
Author:
landauf
Message:

added some control commands to TclThreadManager (status, dump, flush) and changed some small details.
calls to a TclThread are no longer hidden from the main-interpreter. if you want to pass expressions with variables to a thread, put them into {curly braces} - the expression will then be transfered untouched to the sub-interpreter. without braces, the variables will be replaced by the main-interpreter.
the advantage is: you can use a variable to pass the ID of a thread to TclThreadManager, which wasn't possible with the old solution. an example is remote.tcl that creates a thread, saves it's ID in a variable and executes a command on this thread.

oh, and if you didn't understood a word - no problem, this is only important for people using Tcl in Orxonox ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/bin/remote.tcl

    r1267 r1269  
    1 TclThreadManager create
    2 TclThreadManager execute 1 source telnet_server.tcl
     1set telnetserverthreadid [TclThreadManager create]
     2TclThreadManager execute $telnetserverthreadid source telnet_server.tcl
Note: See TracChangeset for help on using the changeset viewer.