Using havelock, I end up writing a lot of callbacks that look like:
function () {
transact(function () {
// do stuffs
});
}
I could get rid of that extra nesting level by having a transaction function which takes a function f and returns a function which calls f in the context of a transaction.
Using havelock, I end up writing a lot of callbacks that look like:
I could get rid of that extra nesting level by having a
transaction
function which takes a functionf
and returns a function which callsf
in the context of a transaction.