Changeset 2753 in Sophya for trunk/SophyaLib/SysTools


Ignore:
Timestamp:
May 23, 2005, 6:20:59 PM (20 years ago)
Author:
ansari
Message:

1/ Ajout methode Nop() ds ZSync - pour eviter les warnings unused variable
2/ Ajout de la methode IsThreadable() a l'interface CmdExecutor et sa prise
en compte pour l'execution en thread separe

Reza , 23 Mai 2005

Location:
trunk/SophyaLib/SysTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SysTools/commander.cc

    r2680 r2753  
    19251925    if ((*it).second.cex) {
    19261926      // Doit-on l'executer sous forme de thread separe ?
    1927       if ((args.size()>0) && (args[args.size()-1] == "&")) {
     1927      if ( (args.size()>0) && (args[args.size()-1] == "&") &&
     1928           ((*it).second.cex->IsThreadable(keyw)) ) {
    19281929        ThrId++;
    19291930        CommandExeThr * thr = new CommandExeThr(ThrId, (*it).second.cex, keyw, args, toks);
  • trunk/SophyaLib/SysTools/commander.h

    r2671 r2753  
    5252  virtual       ~CmdExecutor() {} ;
    5353  // keyw : Le mot cle associe , args: Arguments de la commande
     54  //! command execution method for a command defined by keyword and its arguments.
    5455  virtual int   Execute(string& keyw, vector<string>& args, string& toks)=0;
     56  //! Return true if the command \b keyw is thread compatible
     57  virtual bool  IsThreadable(string const & keyw) { return false; }
    5558};
    5659
  • trunk/SophyaLib/SysTools/zthread.h

    r2671 r2753  
    110110    }
    111111  }
     112//! To avoid warnings about unused variables
     113  inline int NOp() { return _sigbr; }
    112114
    113115private:
Note: See TracChangeset for help on using the changeset viewer.