Changeset 2486 in Sophya for trunk/SophyaPI/PIext/piacmd.cc
- Timestamp:
- Dec 26, 2003, 12:17:41 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/piacmd.cc
r2474 r2486 180 180 181 181 InitializeHelpWindowMenu(); 182 // <ZThread> Thread control attributes 183 fg_thrstop = false; 184 fg_threxe = false; 182 185 } 183 186 … … 195 198 } 196 199 200 201 /* --Methode-- */ 202 void PIACmd::AddInputLine(string const & line) 203 { 204 mutx_inps.lock(); 205 inputlines.push(line); 206 mutx_inps.unlock(); 207 mutx_inps.broadcast(); 208 } 209 210 /* --Methode-- */ 211 void PIACmd::StopThread() 212 { 213 fg_thrstop = true; 214 mutx_inps.broadcast(); 215 } 216 217 /* --Methode-- */ 218 void PIACmd::run() 219 { 220 cout << " DBG-PIACmd::run() -- DEBUT " << endl; 221 while (!fg_thrstop) { 222 mutx_inps.lock(); 223 while (inputlines.empty()) { 224 fg_threxe = false; 225 mutx_inps.wait(); 226 } 227 string line = inputlines.top(); 228 inputlines.pop(); 229 fg_threxe = true; 230 mutx_inps.unlock(); 231 Interpret(line); 232 } 233 } 197 234 198 235 /* --Methode-- */
Note:
See TracChangeset
for help on using the changeset viewer.