Skip to content

Instantly share code, notes, and snippets.

@kirkshoop
Created September 6, 2013 05:49
Show Gist options
  • Save kirkshoop/6460005 to your computer and use it in GitHub Desktop.
Save kirkshoop/6460005 to your computer and use it in GitHub Desktop.
The core of DeferOperation
// must take the deferral early while the event is still on the stack.
auto op = make_operation_pattern(sop(t));
typedef decltype(op) OP;
return Using(
// resource factory
[=]()
{
return op;
},
// observable factory
[sob, t](OP op)
{
return sob(op, t);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment