Browse Source

Make turns atomic, rather than reply-turn-per-event

novy
Tony Garnock-Jones 5 months ago
parent
commit
c7718b3ddd
  1. 2
      src/main/java/org/syndicate_lang/actors/Turn.java

2
src/main/java/org/syndicate_lang/actors/Turn.java

@ -36,7 +36,7 @@ public class Turn {
private void commit() {
if (_pending != null) {
_pending.forEach((ac, q) -> ac.execute(() -> q.forEach(f -> Turn.forActor(ac, f))));
_pending.forEach((ac, q) -> ac.execute(() -> Turn.forActor(ac, t -> q.forEach(f -> f.accept(t)))));
_pending = null;
}
_complete = true;

Loading…
Cancel
Save