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

Async ExchangeAPI init #668

Merged
merged 6 commits into from
Oct 1, 2021
Merged

Conversation

bezysoftware
Copy link
Contributor

@bezysoftware bezysoftware commented Sep 30, 2021

What I though would be a quick and easy change escalated rather quickly :) The existing sync methods are marked as obsolete with a hint to use the async ones.
The semaphore in GetExchangeAPIAsync is used to make sure initialization is called only once

resolves #666 (😈)

return GetExchangeAPIAsync<T>().Result;
}

public static Task<IExchangeAPI> GetExchangeAPIAsync<T>() where T : ExchangeAPI
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you update the example in README.md to this new method?

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

Copy link
Collaborator

@vslee vslee left a comment

Choose a reason for hiding this comment

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

This is technically not a "breaking change", since you are using the Obsolete attribute, but I will mark it with the "breaking change" tag to alert ppl to migrate.

@vslee vslee merged commit ecca3f9 into DigitalRuby:master Oct 1, 2021
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.

InitializeAsync is called with .Sync() which blocks the calling UI thread
2 participants