orleans turn exclusivity

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

  bump -> 1
  await other-grain — non-reentrant, turn held
  bump -> 2
  turn t1 ends
  bump -> 3
  await other-grain — REENTRANT; another turn bumped to 4
  bump -> 5
  turn resumed ends

Expected output

  bump -> 1
  await other-grain — non-reentrant, turn held
  bump -> 2
  turn t1 ends
  bump -> 3
  await other-grain — REENTRANT; another turn bumped to 4
  bump -> 5
  turn resumed ends

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: grain, capacity: 1, source: count: 0[i64])
subflow ~turn.end click a branch to expand · @labels scroll to their anchor
print.ln (expr: " turn {{ turn:s }} ends")
subflow ~state.bump click a branch to expand · @labels scroll to their anchor
stored (source: grain.count: grain.count + 1)
subflow ~call.blocking click a branch to expand · @labels scroll to their anchor
print.ln (expr: " await {{ target:s }} — non-reentrant, turn held")
subflow ~call.interleaving click a branch to expand · @labels scroll to their anchor
stored (source: grain.count: grain.count + 1)
flow ~turn.begin click a branch to expand · @labels scroll to their anchor
turn.begin (id: "t1")
flow ~turn.begin click a branch to expand · @labels scroll to their anchor
turn.begin (id: "t2")

Test Configuration

MUST_RUN