mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 22:38:34 +02:00
Refactor netscriptDelay and script kill interaction
Store the Promise reject function instead of resolve in WorkerScript, since it's only used when killing a script that's blocked in delay. And when killing a script, reject the delay Promise with the WorkerScript as cause.
This commit is contained in:
@@ -33,9 +33,9 @@ export class WorkerScript {
|
||||
delay: number | null = null;
|
||||
|
||||
/**
|
||||
* Holds the Promise resolve() function for when the script is "blocked" by an async op
|
||||
* Holds the Promise reject() function while the script is "blocked" by an async op
|
||||
*/
|
||||
delayResolve?: () => void;
|
||||
delayReject?: (reason?: any) => void;
|
||||
|
||||
/**
|
||||
* Stores names of all functions that have logging disabled
|
||||
|
||||
Reference in New Issue
Block a user