Instead of assigning a new array, just set the length to 0: `this.threadsBatch.length = 0;`.