Nested Transaction.Post code should execute after all "top level" Transaction.Post code has executed.
Given the following block of code:
Cell<int> cell = Transaction.Run(() =>
{
StreamSink<int> s = Stream.CreateSink<int>();
Transaction.Post(() =>
{
s.Send(1);
Transaction.Post(() => s.Send(3));
});
Transaction.Post(() => s.Send(2));
return s.Hold(0);
});
int result = cell.Sample();
The value of result should be 3, but it currently is 2 due to the nested Transaction.Post code executing before the second top-level Transaction.Post code.
Nested
Transaction.Post
code should execute after all "top level"Transaction.Post
code has executed.Given the following block of code:
The value of
result
should be3
, but it currently is2
due to the nestedTransaction.Post
code executing before the second top-levelTransaction.Post
code.