()
| 122 | } |
| 123 | |
| 124 | public reset():void { |
| 125 | this._isAvailable = false; |
| 126 | try { |
| 127 | this._worker.terminate(); |
| 128 | } catch(e) { |
| 129 | this._scripter.logger.error(e); |
| 130 | } |
| 131 | this._queue.clear(); |
| 132 | |
| 133 | // Empty any remnants in the scripting context |
| 134 | this._scriptingContext.reset(); |
| 135 | // Reset the current worker |
| 136 | this._worker = new OOAPIWorker(this._scripter.getWorker()); |
| 137 | this._bind(); |
| 138 | } |
| 139 | } |