Commit 7d0131d3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 59aa7e1f
...@@ -51,10 +51,10 @@ pair<WatchLink, error> WCFS::_openwatch() { ...@@ -51,10 +51,10 @@ pair<WatchLink, error> WCFS::_openwatch() {
context::Context serveCtx; context::Context serveCtx;
tie(serveCtx, wlink->_serveCancel) = context::with_cancel(context::background()); tie(serveCtx, wlink->_serveCancel) = context::with_cancel(context::background());
#if 0 wlink->_serveWG = sync::NewWorkGroup(serveCtx);
wlink->_serveWG = sync.WorkGroup(serveCtx) wlink->_serveWG->go([wlink](context::Context ctx) -> error {
wlink->_serveWG.go(wlink._serveRX) return wlink->_serveRX(ctx);
#endif });
return make_pair(wlink, nil); return make_pair(wlink, nil);
} }
...@@ -87,14 +87,10 @@ error _WatchLink::close() { ...@@ -87,14 +87,10 @@ error _WatchLink::close() {
// //
// XXX -> better pthread_kill(SIGINT) instead of relying on wcfs proper behaviour? // XXX -> better pthread_kill(SIGINT) instead of relying on wcfs proper behaviour?
// XXX -> we now have `kill -QUIT` to wcfs.go on test timeout - remove ^^^ comments? // XXX -> we now have `kill -QUIT` to wcfs.go on test timeout - remove ^^^ comments?
#if 0 error err = wlink._serveWG->wait();
error err = wlink._serveWG.wait();
// canceled is expected and ok // canceled is expected and ok
if (err == context.canceled) if (err == context::canceled)
err = nil; err = nil;
#else
error err = nil;
#endif
error err2 = wlink._f->close(); error err2 = wlink._f->close();
if (err == nil) if (err == nil)
......
...@@ -87,9 +87,7 @@ class _WatchLink : public object { ...@@ -87,9 +87,7 @@ class _WatchLink : public object {
sync::Once _txclose1; sync::Once _txclose1;
func<void()> _serveCancel; func<void()> _serveCancel;
#if 0 sync::WorkGroup _serveWG;
sync.WorkGroup *_serveWG
#endif
// don't new - create only via WCFS._openwatch() // don't new - create only via WCFS._openwatch()
private: private:
......
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