diff --git a/examples/clear-range-async/source/app.d b/examples/clear-range-async/source/app.d index e62c899..7c99358 100644 --- a/examples/clear-range-async/source/app.d +++ b/examples/clear-range-async/source/app.d @@ -36,7 +36,7 @@ void main() tr[key1] = pack("SomeValue1"); tr[key2] = pack("SomeValue2"); - tr.commit((ex) + tr.commitAsync((ex) { "Creating clear transaction".writeln; auto tr2 = db.createTransaction; @@ -56,7 +56,7 @@ void main() if (ex2) ex2.handleException; "Commiting clear transaction".writeln; - tr2.commit((ex3) + tr2.commitAsync((ex3) { "Stopping network".writeln; fdb.close; diff --git a/examples/get-range-async/source/app.d b/examples/get-range-async/source/app.d index c5deff9..2095861 100644 --- a/examples/get-range-async/source/app.d +++ b/examples/get-range-async/source/app.d @@ -35,7 +35,7 @@ void main() tr[key1] = pack("SomeValue1"); tr[key2] = pack("SomeValue2"); - tr.commit((ex) + tr.commitAsync((ex) { "Creating read transaction".writeln; auto tr2 = db.createTransaction; @@ -70,12 +70,8 @@ void main() { if (ex2) ex2.handleException; - "Commiting read transaction".writeln; - tr2.commit((ex3) - { - "Stopping network".writeln; - fdb.close; - }); + tr2.cancel; + fdb.close; }); }); } diff --git a/examples/get-value-async/source/app.d b/examples/get-value-async/source/app.d index 1df5bd8..421ca68 100644 --- a/examples/get-value-async/source/app.d +++ b/examples/get-value-async/source/app.d @@ -28,7 +28,7 @@ void main() "Setting SomeKey to SomeValue".writeln; auto key = "SomeKey".pack; tr[key] = "SomeValue".pack; - tr.commit((ex) + tr.commitAsync((ex) { if (ex) ex.handleException; @@ -46,15 +46,10 @@ void main() writeln("SomeKey = " ~ value.unpack!string); - tr2.commit((ex3) - { - if (ex3) - ex3.handleException; - "Committed read transaction".writeln; + tr2.cancel; - "Stopping network".writeln; - fdb.close; - }); + "Stopping network".writeln; + fdb.close; }); }); }