3 ms·
That covers one direction of errors, putting an await on a sync function, but doesn't ensure that you put an await on async functions when needed. Async specif
by 8note 5y ago
That covers one direction of errors, putting an await on a sync function, but doesn't ensure that you put an await on async functions when needed.
Async specifies that a function has two different behaviours: starting and finishing. You could assume everything is async, in which case the problem goes away, but that also moves the problem from code and into your head to remember whether something can be just started without completing