Comment

Comment by gus_massa

> When a blocking operation is invoked, Jactl creates a Continuation object that captures the state of the running script such as the value of all local variables and the current call stack. When the long-running operation completes, the script state is restored and the script continues from where it left off.

I don't understand this. Is it possible that some code runs twice? (I know continuations from Racket/Scheme, but perhaps I'm misunderstanding the implementation.)

  a = slow(7)
  print(5)
  somethingelse()
  print(a)
Can 5 be printed twice?
parent gus_massa 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton