8000 DispatchEvent() must be sequential and cannot be fire & forget by HistoricallyCorrect · Pull Request #52 · optimizely/csharp-sdk · GitHub
[go: up one dir, main page]

Skip to content

DispatchEvent() must be sequential and cannot be fire & forget #52

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

Closed
wants to merge 2 commits into from
Closed

DispatchEvent() must be sequential and cannot be fire & forget #52

wants to merge 2 commits into from

Conversation

HistoricallyCorrect
Copy link

When Activate() & Track() are called, Track() can only proceed after
Activate() completes successfully. Hence the fire & forget pattern for
DispatchEvent() will not work.

Original issue:

#51

When Activate() & Track() are called, Track() can only proceed after
Activate() completes successfully. Hence the fire & forget pattern for
DispatchEvent() will not work.
@optibot
Copy link
Contributor
optibot commented Jan 9, 2018
8000

Can one of the admins verify this patch?

{
Task.Run(() => DispatchEventAsync(logEvent));
}

Copy link
Contributor

Choose a reason for hiding this comment

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

The prime effect of the P.R. #52 proposal will be to change the body of DispatchEvent .
However, I don't understand the purpose of keeping DispatchEventSilently around.
The SDK code doesn't call it and HttpClientEventDispatcher45 isn't documented in
Optimizely's developer documentation. Isn't DispatchEventSilently dead code? Why
isn't this deleted?

Choose a reason for hiding this comment

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

Because I was not sure whether there was a legit reason behind DispatchEvent hiding asynchronous nature of DispatchEventAsync. So I left and renamed the old code as DispatchEventSilently thinking maybe you want to preserve a async version of DispatchEvent and name it more obviously. But if there is no strong reason behind it, then I agree DispatchEventSilently is dead code and should be removed.

@kellyroach-optimizely
Copy link
Contributor

SUPERCEDED BY APPROVED P.R. #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0