Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Commit

Permalink
Fixed examples
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeSapkin committed Feb 9, 2015
1 parent 473475b commit b2cbc1e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
4 changes: 2 additions & 2 deletions examples/clear-range-async/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
10 changes: 3 additions & 7 deletions examples/get-range-async/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
});
});
}
Expand Down
13 changes: 4 additions & 9 deletions examples/get-value-async/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
});
});
}
Expand Down

0 comments on commit b2cbc1e

Please sign in to comment.