_restartThread (thread) {
        const newThread = new Thread(thread.topBlock);
        newThread.target = thread.target;
        newThread.stackClick = thread.stackClick;
        newThread.updateMonitor = thread.updateMonitor;
        newThread.pushStack(thread.topBlock);
        const i = this.threads.indexOf(thread);
        if (i > -1) {
            this.threads[i] = newThread;
            return newThread;
        }
        this.threads.push(thread);
        return thread;
    }
/**
     * Restart a thread in place, maintaining its position in the list of threads.
     * This is used by `startHats` to and is necessary to ensure 2.0-like execution order.
     * Test project: https://scratch.mit.edu/projects/130183108/
     * @param {!Thread} thread Thread object to restart.
     * @return {Thread} The restarted thread.
     */
Restart a thread in place, maintaining its position in the list of threads.
This is used by `startHats` to and is necessary to ensure 2.0-like execution order.
Restart a thread in place maintaining its position in the list of threads . This is used by ` startHats ` to and is necessary to ensure 2 . 0 - like execution order .
_restartThread (thread) {
        const newThread = new Thread(thread.topBlock);
        newThread.target = thread.target;
        newThread.stackClick = thread.stackClick;
        newThread.updateMonitor = thread.updateMonitor;
        newThread.pushStack(thread.topBlock);
        const i = this.threads.indexOf(thread);
        if (i > -1) {
            this.threads[i] = newThread;
            return newThread;
        }
        this.threads.push(thread);
        return thread;
    }
_restartThread ( thread ) { const newThread = new Thread ( thread . topBlock ) ; newThread . target = thread . target ; newThread . stackClick = thread . stackClick ; newThread . updateMonitor = thread . updateMonitor ; newThread . pushStack ( thread . topBlock ) ; const i = this . threads . indexOf ( thread ) ; if ( i > - 1 ) { this . threads [ i ] = newThread ; return newThread ; } this . threads . push ( thread ) ; return thread ; }
Restart a thread in place, maintaining its position in the list of threads.
Restart a thread in place maintaining its position in the list of threads .