Revert "me trying to solve the timing issue with WorkReq (damnit)"

This reverts commit ab118fb712.
This commit is contained in:
Michele Caini 2017-06-16 15:46:16 +02:00
parent 23a60af1e7
commit c3537ce52f

View File

@ -64,18 +64,9 @@ TEST(Work, Cancellation) {
checkWorkEvent = true;
});
auto launcher = [](auto &request) {
struct Cancel {
Cancel(uvw::WorkReq &req): req{req} {}
~Cancel() { req.cancel(); }
uvw::WorkReq &req;
} cancel{request};
return request.queue(), (void)cancel;
};
handle->start();
launcher(*req);
req->queue();
req->cancel();
loop->run();
ASSERT_TRUE(checkErrorEvent);