Commit 32ff9179 authored by Marc Gravell's avatar Marc Gravell

Clearer async code

parent a30bbecb
......@@ -82,7 +82,7 @@ Concurrency
It should be noted that the pipeline / multiplexer / future-value approach also plays very nicely with continuation-based asynchronous code; for example you could write:
var value = (string) await db.StringGet(key);
string value = await db.StringGet(key);
if (value == null) {
value = await ComputeValueFromDatabase(...);
db.StringSet(key, value, flags: CommandFlags.FireAndForget);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment