virtual moves the scheduler's clock forward to the fiber's due time and runs it, so
Thread.sleep costs no wall time. real leaves the clock alone, so Scheduler.drain
stops at the first fiber that is not due yet and Scheduler.drainAsync waits for it.
Workers pin Date.now() between I/O, so under real a program that sleeps without doing any
I/O never becomes due inside one request. That is why virtual is the default.
How a fiber scheduled for the future is treated.
virtualmoves the scheduler's clock forward to the fiber's due time and runs it, soThread.sleepcosts no wall time.realleaves the clock alone, so Scheduler.drain stops at the first fiber that is not due yet and Scheduler.drainAsync waits for it.Workers pin
Date.now()between I/O, so underreala program that sleeps without doing any I/O never becomes due inside one request. That is whyvirtualis the default.