Skip to content
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

Merged
merged 4 commits into from Nov 3, 2015
Merged

Conversation

hham
Copy link
Contributor

@hham hham commented Nov 2, 2015

Add Deferred(DispatchQueue*) and a dedicated unit test.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tab this one out

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@codemercenary
Copy link
Contributor

Good call, @hham. This should guard use cases in Platform.

@@ -13,4 +14,5 @@ class CoreThread;
class Deferred {
public:
Deferred(CoreThread* pThread) {}
Copy link
Contributor

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.

Copy link
Contributor Author

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);
}
Copy link
Contributor

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.

Copy link
Contributor

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.

codemercenary added a commit that referenced this pull request Nov 3, 2015
@codemercenary codemercenary merged commit dbaafce into develop Nov 3, 2015
@codemercenary codemercenary deleted the feature-deferred_dqueue branch November 3, 2015 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants