Support batched try_lock
s
#309
Labels
enhancement/optimization
Improves performance
enhancement/refactor
Improves flexibility/maintainability
Right now, any contract which has a list of keys it must lock to succeed will write their own version of the following boilerplate (pseudocode, of course):
This isn't particularly hard to write or difficult to write correctly, but it means many execution context switches (from the runner waiting on the broker(?), and vice versa), and will likely be frequently needed.
A hypothetical
try_batch_lock()
which takes a vector of keys in place of a single key, would reduce this boilerplate to the much simpler:Moreover, this could dramatically reduce the roundtrip count between the runner and the external execution environment.
The text was updated successfully, but these errors were encountered: