News for hackers. Stuff that matters.
Re:You Can Throw() Anything in JavaScript – and Other Async/... by poink on Friday April 08, 2022 @09:41AM (#30956661)
I think the issue they were getting at is code like this:

    function doSomething(doSomethingElse) {
      internalState.setUp();
      doSomethingElse();
      internalState.tearDown();
    }
Right now, you can safely assume this whole thing will execute to completion without anything else happening in the interim, so a lot of existing JS makes that assumption. If `doSomethingElse` can yield while other code executes the assumption becomes invalid.

There are no comments on this comment yet.