File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed
Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ export namespace CompileTools {
2525 updateProgress ?: ( message : string ) => void
2626 }
2727
28+ export function reset ( ) {
29+ ileQueue . clear ( ) ;
30+ jobLogOrdinal = 0 ;
31+ }
32+
2833 /**
2934 * Execute a command
3035 */
Original file line number Diff line number Diff line change @@ -1170,6 +1170,8 @@ export default class IBMi {
11701170 }
11711171
11721172 private async dispose ( ) {
1173+ CompileTools . reset ( ) ;
1174+
11731175 //Clear connected resources
11741176 if ( this . sqlJob ) {
11751177 delete this . sqlJob ;
Original file line number Diff line number Diff line change 11export class SimpleQueue {
2- private static _instance : SimpleQueue | null = null ;
3-
4- static get instance ( ) {
5- if ( ! this . _instance ) {
6- this . _instance = new SimpleQueue ( ) ;
7- }
8- return this . _instance ;
9- }
10-
112 private delay = 0 ; // milliseconds
12- private queue : ( ( ) => Promise < void > ) [ ] = [ ] ;
3+ private readonly queue : ( ( ) => Promise < void > ) [ ] = [ ] ;
134 private queueRunning = false ;
145
156 setDelay ( delay : number ) {
167 this . delay = delay ;
178 }
189
10+ clear ( ) {
11+ this . queue . splice ( 0 , this . queue . length ) ;
12+ }
13+
1914 next < T > ( run : ( ) => Promise < T > , cancelCheck ?: ( ) => boolean ) : Promise < T > {
2015 return new Promise < T > ( ( resolve , reject ) => {
2116 this . queue . push ( async ( ) => {
You can’t perform that action at this time.
0 commit comments