Commit 2daaa227 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 011766ea
......@@ -67,6 +67,25 @@ struct IContext {
virtual error err() = 0;
};
// context::
namespace context {
struct _Background : IContext {
chan<structZ> done() {
return nil;
}
error err() {
return nil;
}
};
IContext* background() {
return (_Background*)nil; // FIXME not valid in C++ (IContext* also carries vtab ptr)
}
} // context::
#if 0
interface(Context) {
ifunc(chan<structZ> done());
......@@ -412,7 +431,7 @@ error Conn::resync(Tid at) {
string ack;
tie(ack, err) = wconn._wlink->sendReq(context.background(), fmt::sprintf("watch %s @%s", h_(foid), h_(at)));
tie(ack, err) = wconn._wlink->sendReq(context::background(), fmt::sprintf("watch %s @%s", h_(foid), h_(at)));
if (err != nil)
return err;
if (ack != "ok") {
......
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