| ▲ | kreetx 8 hours ago | |||||||
What if you want to compose an action on a balance with something else? (That is what the OP is about) Also, with a queue, you've moved the shared state elsewhere, namely, into the queue. | ||||||||
| ▲ | tlb 5 hours ago | parent [-] | |||||||
The account-owning thread has to accept messages for every atomic action you need it to do. There are lots of standard shared queues you can pick from that have been fully regression tested. That's almost always better than mixing concurrency in with your business logic. | ||||||||
| ||||||||