| 1579 | } |
| 1580 | |
| 1581 | ConsoleValue execute(S32 argc, ConsoleValue argv[]) |
| 1582 | { |
| 1583 | #ifdef TORQUE_MULTITHREAD |
| 1584 | if(isMainThread()) |
| 1585 | { |
| 1586 | #endif |
| 1587 | ConsoleStackFrameSaver stackSaver; |
| 1588 | stackSaver.save(); |
| 1589 | return _internalExecute(argc, argv); |
| 1590 | #ifdef TORQUE_MULTITHREAD |
| 1591 | } |
| 1592 | else |
| 1593 | { |
| 1594 | SimConsoleThreadExecCallback cb; |
| 1595 | SimConsoleThreadExecEvent *evt = new SimConsoleThreadExecEvent(argc, argv, false, &cb); |
| 1596 | Sim::postEvent(Sim::getRootGroup(), evt, Sim::getCurrentTime()); |
| 1597 | |
| 1598 | return cb.waitForResult(); |
| 1599 | } |
| 1600 | #endif |
| 1601 | } |
| 1602 | |
| 1603 | ConsoleValue execute(S32 argc, const char *argv[]) |
| 1604 | { |