Apply every write made by fn atomically with a single store publication.
Use the batch handle for all writes inside fn, and keep fn
synchronous. A store write made around the handle while the batch is open
(a store action, a transaction op) would be overwritten when the batch
publishes, so it makes the batch throw and publish nothing; an async fn
throws too. A nested batchGraphWrites on the same store joins the outer
batch, so atomicity is that of the outermost batch.
Apply every write made by
fnatomically with a single store publication.Use the
batchhandle for all writes insidefn, and keepfnsynchronous. A store write made around the handle while the batch is open (a store action, a transaction op) would be overwritten when the batch publishes, so it makes the batch throw and publish nothing; an asyncfnthrows too. A nestedbatchGraphWriteson the same store joins the outer batch, so atomicity is that of the outermost batch.