All Projects → reactiveui → Punchclock

reactiveui / Punchclock

Licence: mit
Make sure your asynchronous operations show up to work on time

Projects that are alternatives of or similar to Punchclock

Fusillade
An opinionated HTTP library for Mobile Development
Stars: ✭ 269 (+14.47%)
Mutual labels:  http-client, cross-platform, dotnet-core, xamarin
Restclient.net
.NET REST Client Framework for all platforms
Stars: ✭ 143 (-39.15%)
Mutual labels:  async, xamarin
Aiohttp
Asynchronous HTTP client/server framework for asyncio and Python
Stars: ✭ 11,972 (+4994.47%)
Mutual labels:  async, http-client
Tiny.restclient
Simpliest Fluent REST client for .NET
Stars: ✭ 158 (-32.77%)
Mutual labels:  dotnet-core, xamarin
Expressive
Expressive is a cross-platform expression parsing and evaluation framework. The cross-platform nature is achieved through compiling for .NET Standard so it will run on practically any platform.
Stars: ✭ 113 (-51.91%)
Mutual labels:  cross-platform, xamarin
Skiasharp.extended
SkiaSharp is a cross-platform, comprehensive 2D graphics API for all .NET platforms. And, here is where you will find all sorts of extras that you can use with it.
Stars: ✭ 118 (-49.79%)
Mutual labels:  cross-platform, xamarin
Uno.quickstart
An Uno "Hello world!" project using Windows UWP, iOS, Android and WebAssembly
Stars: ✭ 157 (-33.19%)
Mutual labels:  cross-platform, xamarin
Reactivemvvm
Cross-platform ReactiveUI sample app built for a talk at MSK .NET conf.
Stars: ✭ 94 (-60%)
Mutual labels:  cross-platform, xamarin
Coverlet
Cross platform code coverage for .NET
Stars: ✭ 2,303 (+880%)
Mutual labels:  cross-platform, dotnet-core
Akavache
An asynchronous, persistent key-value store created for writing desktop and mobile applications, based on SQLite3. Akavache is great for both storing important data as well as cached local data that expires.
Stars: ✭ 2,185 (+829.79%)
Mutual labels:  cross-platform, xamarin
Skiasharp
SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
Stars: ✭ 2,493 (+960.85%)
Mutual labels:  cross-platform, xamarin
Snug
Write reusable web API interactions
Stars: ✭ 108 (-54.04%)
Mutual labels:  async, http-client
Yacep
yet another csharp expression parser
Stars: ✭ 107 (-54.47%)
Mutual labels:  cross-platform, dotnet-core
Easy.logger
A modern, high performance cross platform wrapper for Log4Net.
Stars: ✭ 118 (-49.79%)
Mutual labels:  cross-platform, dotnet-core
Essentials
Essential cross platform APIs for your mobile apps.
Stars: ✭ 1,344 (+471.91%)
Mutual labels:  cross-platform, xamarin
Protobuild
This project has been retired.
Stars: ✭ 153 (-34.89%)
Mutual labels:  cross-platform, xamarin
Easy.messagehub
No need for .NET Events! A thread-safe, high performance & easy to use cross platform implementation of the Event Aggregator Pattern.
Stars: ✭ 208 (-11.49%)
Mutual labels:  cross-platform, dotnet-core
Http Client
A high-performance, high-stability, cross-platform HTTP client.
Stars: ✭ 86 (-63.4%)
Mutual labels:  http-client, cross-platform
Httptransfertasks
Cross Platform HTTP Transfers for downloading and uploading (supports background operations)
Stars: ✭ 87 (-62.98%)
Mutual labels:  cross-platform, xamarin
Netcorecms
NetCoreCMS is a modular theme supported Content Management System developed using ASP.Net Core 2.0 MVC. Which is also usable as web application framework. This project is still under development. Please do not use before it's first release.
Stars: ✭ 165 (-29.79%)
Mutual labels:  cross-platform, dotnet-core

NuGet Stats Build Code Coverage #yourfirstpr


Punchclock: A library for managing concurrent operations

Punchclock is the low-level scheduling and prioritization library used by Fusillade to orchestrate pending concurrent operations.

What even does that mean?

Ok, so you've got a shiny mobile phone app and you've got async/await. Awesome! It's so easy to issue network requests, why not do it all the time? After your users one-🌟 you for your app being slow, you discover that you're issuing way too many requests at the same time.

Then, you try to manage issuing less requests by hand, and it becomes a spaghetti mess as different parts of your app reach into each other to try to figure out who's doing what. Let's figure out a better way.

So many words, gimme the examples

var wc = new WebClient();
var opQueue = new OperationQueue(2 /*at a time*/);

// Download a bunch of images
var foo = opQueue.Enqueue(1, 
    () => wc.DownloadFile("https://example.com/foo.jpg", "foo.jpg"));
var bar = opQueue.Enqueue(1, 
    () => wc.DownloadFile("https://example.com/bar.jpg", "bar.jpg"));
var baz = opQueue.Enqueue(1, 
    () => wc.DownloadFile("https://example.com/baz.jpg", "baz.jpg"));
var bamf = opQueue.Enqueue(1, 
    () => wc.DownloadFile("https://example.com/bamf.jpg", "bamf.jpg"));

// We'll be downloading the images two at a time, even though we started 
// them all at once
await Task.WaitAll(foo, bar, baz, bamf);

Now, in a completely different part of your app, if you need something right away, you can specify it via the priority:

// This file is super important, we don't care if it cuts in line in front
// of some images or other stuff
var wc = new WebClient();
await opQueue.Enqueue(10 /* It's Important */, 
    () => wc.DownloadFileTaskAsync("http://example.com/cool.txt", "./cool.txt"));

What else can this library do

  • Cancellation via CancellationTokens or via Observables
  • Ensure certain operations don't run concurrently via a key
  • Queue pause / resume

Contribute

Punchclock is developed under an OSI-approved open source license, making it freely usable and distributable, even for commercial use. Because of our Open Collective model for funding and transparency, we are able to funnel support and funds through to our contributors and community. We ❤ the people who are involved in this project, and we’d love to have you on board, especially if you are just getting started or have never contributed to open-source before.

So here's to you, lovely person who wants to join us — this is how you can support us:

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].