You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could make batches atomic, so that none of the changes are committed until the end of the batch. Any errors that occur during a batch will roll back the changes. This would make errors that occur during a batch more predictable, because currently it will put the derived cells in an invalid state, since the batch that's responsible for updating derived cells failed.
localc=cell(0)
pcall(batch, function()
c.value=1error("An error occured!")
end)
print(c.value) -- Will print 0, since there was an error during the batch operation.
Batches should be able to be nested and each nested batch should be atomic as well.
localc=cell(0)
batch(function()
pcall(batch, function()
c.value=1error("An error occured!")
end)
print(c.value) -- Will print 0, since there was an error during the batch operationend
We should consider making it so reading a value inside of a batch should give whatever the value last was set to in that batch. However this isn't strictly necessary, and might just make it confusing when trying to see why the value of a cell seemingly got reverted.
localc=cell(0)
pcall(batch, function()
c.value=1print(c.value) -- Will print 1error("An error occured!")
end)
print(c.value) -- Will print 0, since there was an error during the batch operation.
The text was updated successfully, but these errors were encountered:
We could make batches atomic, so that none of the changes are committed until the end of the batch. Any errors that occur during a batch will roll back the changes. This would make errors that occur during a batch more predictable, because currently it will put the derived cells in an invalid state, since the batch that's responsible for updating derived cells failed.
Batches should be able to be nested and each nested batch should be atomic as well.
We should consider making it so reading a value inside of a batch should give whatever the value last was set to in that batch. However this isn't strictly necessary, and might just make it confusing when trying to see why the value of a cell seemingly got reverted.
The text was updated successfully, but these errors were encountered: