4 ms·
Seems like this is what mutexes were invented for
by bouk 10y ago
Seems like this is what mutexes were invented for
- JulianMorrison 10y agoWith a mutex, an A -> B -> A call would deadlock if the mutex is the stop-and-wait or spin-and-retry sort. It would have to be a succeed-or-exception mutex, which is not a common design.
- vessenes 10y agoThe typical solidity dev is "but mutexes cost so much gas!" There's an optimization problem not yet sorted out here. If I were king of ethereum, (happily I'm not), I'd make a very cheap mutex support part of the eth vm and encourage solidity and serpent devs to use it as needed.
- drcode 10y agoI suspect we'll see something like mutexes in the next ethereum EVM revision.
- vessenes 10y agoYes, that would be a kind and fine thing to do, or at least change the cost of a specially designated bool argument to something cheap. You get one per contract, kind of thing. Or you pay on deployment.