New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Deferred(DispatchQueue*) #817
Conversation
@@ -664,6 +664,39 @@ TEST_F(AutoFilterTest, DeferredDecorateOnly) { | |||
ASSERT_EQ(105, dec->i) << "Deferred decorate-only AutoFilter did not properly attach before context termination"; | |||
} | |||
|
|||
class DQueueSharedPointer: | |||
public DispatchQueue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tab this one out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Good call, @hham. This should guard use cases in Platform. |
@@ -13,4 +14,5 @@ class CoreThread; | |||
class Deferred { | |||
public: | |||
Deferred(CoreThread* pThread) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this ctor completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
// Decorate the packet, forget about it: | ||
auto packet = factory->NewPacket(); | ||
packet->Decorate(ptr); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want to add ASSERT_EQ(0UL, dQueueSharedPtr->callCount)
at this point, so we can be assured that the filter is not called prematurely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the last thing, then I'll merge.
Add Deferred(DispatchQueue*)
Add Deferred(DispatchQueue*) and a dedicated unit test.