We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bee5ac commit f656ed7Copy full SHA for f656ed7
src/processes/process_system.js
@@ -24,9 +24,7 @@ class ProcessSystem {
24
25
let process_system_scope = this;
26
this.main_process_pid = this.spawn(function*(){
27
- while(true){
28
- yield process_system_scope.sleep(10000);
29
- }
+ yield process_system_scope.sleep(Symbol.for("Infinity"));
30
});
31
this.set_current(this.main_process_pid);
32
}
@@ -246,7 +244,10 @@ class ProcessSystem {
246
244
247
245
delay(fun, time){
248
this.current_process.status = States.SLEEPING;
249
- this.scheduler.scheduleFuture(this.current_process.pid, time, fun);
+
+ if(Number.isInteger(time)){
+ this.scheduler.scheduleFuture(this.current_process.pid, time, fun);
250
+ }
251
252
253
schedule(fun, pid){
0 commit comments