3 ms·
I think the person you're replying to means something like "context" rather than what you're calling a transaction. So you'd give the function all the context i
by jeffreyrogers 9y ago
I think the person you're replying to means something like "context" rather than what you're calling a transaction. So you'd give the function all the context it needs to atomically perform whatever update it needs to perform. That's my best guess at least.
Of course, part of the reason we don't do this is performance: it costs a lot to copy around all the state you need to perform an action.
- amelius 9y agoYou can call it a transaction context, but it's really a transaction that's being passed, i.e., you're saying to the called function: every change you make is happening within this transaction I'm passing you here. It's nothing new of course. What I'm saying here is that APIs should support the concept.