All Projects → zzzprojects → Linq Async

zzzprojects / Linq Async

Licence: mit
C# LINQ Async extension methods library for async/await task.

Labels

Projects that are alternatives of or similar to Linq Async

Promised Pipe
A ramda.pipe-like utility that handles promises internally with zero dependencies
Stars: ✭ 64 (-21.95%)
Mutual labels:  async
Traffic Shm
traffic-shm (Anna) is a Java based lock free IPC library.
Stars: ✭ 72 (-12.2%)
Mutual labels:  async
Suave
Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.
Stars: ✭ 1,196 (+1358.54%)
Mutual labels:  async
Emittery
Simple and modern async event emitter
Stars: ✭ 1,146 (+1297.56%)
Mutual labels:  async
Forge
A Generic Low-Code Framework Built on a Config-Driven Tree Walker
Stars: ✭ 70 (-14.63%)
Mutual labels:  async
Memento
Fairly basic redis-like hashmap implementation on top of a epoll TCP server.
Stars: ✭ 74 (-9.76%)
Mutual labels:  async
Lily
LÖVE Async Asset Loader
Stars: ✭ 64 (-21.95%)
Mutual labels:  async
Kotlin Futures
A collections of extension functions to make the JVM Future, CompletableFuture, ListenableFuture API more functional and Kotlin like.
Stars: ✭ 79 (-3.66%)
Mutual labels:  async
Tanya
GC-free, high-performance D library: Containers, networking, metaprogramming, memory management, utilities
Stars: ✭ 70 (-14.63%)
Mutual labels:  async
Keshi
A better in-memory cache for Node and the browser
Stars: ✭ 75 (-8.54%)
Mutual labels:  async
Sync
Synchronization primitives for PHP based on Amp.
Stars: ✭ 67 (-18.29%)
Mutual labels:  async
Write
Write data to the file system, creating any intermediate directories if they don't already exist. Used by flat-cache and many others!
Stars: ✭ 68 (-17.07%)
Mutual labels:  async
C Ares
A C library for asynchronous DNS requests
Stars: ✭ 1,193 (+1354.88%)
Mutual labels:  async
Flowa
🔥Service level control flow for Node.js
Stars: ✭ 66 (-19.51%)
Mutual labels:  async
Sming
Sming - Open Source framework for high efficiency native ESP8266 development
Stars: ✭ 1,197 (+1359.76%)
Mutual labels:  async
Frame Scheduling
Asynchronous non-blocking running many tasks in JavaScript. Demo https://codesandbox.io/s/admiring-ride-jdoq0
Stars: ✭ 64 (-21.95%)
Mutual labels:  async
Async
Async utilities for Golang.
Stars: ✭ 72 (-12.2%)
Mutual labels:  async
Radon
Object oriented state management solution for front-end development.
Stars: ✭ 80 (-2.44%)
Mutual labels:  async
Javelin
[Mirror] RTMP streaming server written in Rust
Stars: ✭ 77 (-6.1%)
Mutual labels:  async
Pfun
Functional, composable, asynchronous, type-safe Python.
Stars: ✭ 75 (-8.54%)
Mutual labels:  async

Library Powered By

This library is powered by Entity Framework Extensions

Entity Framework Extensions

What's LINQ-Async?

LINQ-Async allows you to chain async task and order async predicate with fluent API.

Features

Download

download

PM> Install-Package Z.Linq.Async

Stay updated with latest changes

Twitter Follow Facebook Like

LINQ Async Extensions

Problem

You want to use LINQ methods asynchronously.

Solution

All LINQ extensions methods and overloads are supported. You can easily create any asynchronous task.

// Using Z.Linq

public Task<IEnumerable<Customer>> MyAsyncMethod(CancellationToken cancellationToken)
{
    List<Customer> customers = DB.GetCustomers();
    var task = list.WhereAsync(c => /* long predicate */, cancellationToken);

    // ... synchronous code ...
    
    return task;
}

LINQ Async Predicate Extensions

Problem

You want to resolve a predicate asynchronously and start all predicates concurrently and/or order them by completion.

Solution

All LINQ extensions methods and overloads using a predicate is supported. You can easily use an asynchronously predicate and choose how the predicate will be resolved:

  • OrderByPredicateCompletion(bool)
  • StatePredicateConcurrently(bool)

Support:

  • Deferred
    • SkipWhile
    • Where
  • Immediate
    • All
    • Any
    • Count
    • First
    • FirstOrDefault
    • LongCount
    • Single
    • SingleOrDefault
// Using Z.Linq

// Change global default value
LinqAsyncManager.DefautlValue.OrderByPredicateCompletion = false;
LinqAsyncManager.DefaultValue.StartPredicateConcurrently = false;

public Task<IEnumerable<Customer>> MyAsyncTaskMethod(CancellationToken cancellationToken)
{
    List<Customer> customers = DB.GetCustomers();
    
    // GET all customers by predicate completion
    var task = list.WhereAsync(c => MyAsyncPredicate(DB.IsCustomerActiveAsync(c)))
                   .OrderByPredicateCompletion();

    // ... synchronous code ...
    
    return task;
}

Learn more

LINQ Async Task Extensions

Problem

You want to chain LINQ methods with Task<IEnumerable<T>>.

Solution

All LINQ extensions methods and overloads are supported, you can easily chain multiples LINQ methods before awaiting your final task.

Support:

  • Array
  • Enumerable
  • List

Other types must use "AsEnumerable()" method to allow to chain LINQ methods.

// Using Z.Linq

public async Task<List<Customer>> MyAsyncTaskMethod(CancellationToken cancellationToken)
{
    // GET the five first customers which the predicate has completed
    var task = list.WhereAsync(c => MyAsyncPredicate(DB.IsCustomerActiveAsync(c)))
                         .OrderByPredicateCompletion()
                         .Take(5)
                         .ToList();


    // ... synchronous code ...
    
    return task;
}

Learn more

LINQ Async Enumerable Task Extensions

Problem

You want to use LINQ methods with enumerable task and order them by completion.

Solution

Support:

  • OrderByCompletion
  • SelectResult
// Using Z.Linq

public async Task<List<Customer>> MyAsyncTaskMethod(CancellationToken cancellationToken)
{
    // GET customer from concurrent web service
    IEnumerable<Task<List<Customer>>> task =  WebService.GetCustomers();
    
    // GET the customer list from the first web service completed
    var taskFirstCompleted = task.SelectResultByCompletion()
                                 .SelectResult()
								 .First()
								 
                   
    // GET the five first customers which the predicate has completed
    var task = taskFirstCompleted.WhereAsync(c => MyAsyncPredicate(DB.IsCustomerActiveAsync(c)))
                                 .OrderByPredicateCompletion()
                                 .Take(5)
                                 .ToList();
    
    // ... synchronous code ...
    
    return task;
}

Learn more

Contribute

You want to help us? Your donation directly helps us maintaining and growing ZZZ Free Projects. We can’t thank you enough for your support.

Why should I contribute to this free & open source library?

We all love free and open source libraries! But there is a catch! Nothing is free in this world. Contributions allow us to spend more of our time on: Bug Fix, Content Writing, Development and Support.

We NEED your help. Last year alone, we spent over 3000 hours maintaining all our open source libraries.

How much should I contribute?

Any amount is much appreciated. All our libraries together have more than 100 million downloads, if everyone could contribute a tiny amount, it would help us to make the .NET community a better place to code!

Another great free way to contribute is spreading the word about the library!

A HUGE THANKS for your help.

More Projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].