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

Future Async #230

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Future Async #230

wants to merge 3 commits into from

Conversation

DzheiZee
Copy link
Contributor

Added async to future queries.

  1. Added async methods, did not remove sync. Both are working correctly.
    2.. Added asyncronisity in reader get phase
  2. Added asyncronisity in objects materialization phase.
  3. Added cancellation support throught asynhronous operations.
  4. Covered aditional functionality with additional unit test.

Usage:
for FutureQuery - fq.ToListAsyn(cancelationTokeOptional)
for FutureValue, FutureCount and FutureFirstOrDefault - f.GetValueAsync(cancelationTokeOptional)

I know there is already effort to cover this in #132 but that proposition lacks in some ways.

@DzheiZee
Copy link
Contributor Author

Removed my changes from .net40 version. If someone know how to acomplish async support in net40 be my guest and make propositions/changes.
Personaly for me .net45 support is enough.
Async was introduced with C#5.0 and net45.

@DzheiZee DzheiZee mentioned this pull request Nov 28, 2016
@MagicAndre1981
Copy link

this package seems to bring async to 40:

https://www.nuget.org/packages/AsyncBridge

@DzheiZee
Copy link
Contributor Author

DzheiZee commented Dec 2, 2016

Well if going down this road then https://www.nuget.org/packages/Microsoft.Bcl.Async/ would sound better as a dependency for users of library. But i have not used nether of them so just need to try.

@DzheiZee
Copy link
Contributor Author

DzheiZee commented Dec 5, 2016

Looked deeper, and conclusion, it look like it is imposible. It is because EntityFramework for .net40 does not support async. Shaper does not implements IDbAsyncEnumerator, and it does in .net45 version.

@israellot
Copy link

Thank you! That seems to cover all the aspects I left behind in #132
My approach was simplistic in many ways.

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