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/src/core/CommandExecutor.cc

    r1255 r1269  
    394394        if (useTcl)
    395395        {
    396             std::string temp = getLowercase(removeTrailingWhitespaces(command));
    397             if (!(temp.find("tclthread") == 0 || temp.find("tclthreadmanager") == 0))
     396//            std::string temp = getLowercase(removeTrailingWhitespaces(command));
     397//            if (!(temp.substr(0, 16) == "tclthreadmanager" || temp.substr(0, 10) == "tclexecute" || temp.substr(0, 8) == "tclquery"))
    398398                return TclBind::eval(command);
    399399        }
Note: See TracChangeset for help on using the changeset viewer.