Punchclock 3.4.143
dotnet add package Punchclock --version 3.4.143
NuGet\Install-Package Punchclock -Version 3.4.143
<PackageReference Include="Punchclock" Version="3.4.143" />
paket add Punchclock --version 3.4.143
#r "nuget: Punchclock, 3.4.143"
// Install Punchclock as a Cake Addin #addin nuget:?package=Punchclock&version=3.4.143 // Install Punchclock as a Cake Tool #tool nuget:?package=Punchclock&version=3.4.143
<br /> <a href="https://github.com/reactiveui/punchclock"> <img width="120" heigth="120" src="https://raw.githubusercontent.com/reactiveui/styleguide/master/logo_punchclock/main.png"> </a>
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-:star2: 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:
- Responding to questions on StackOverflow
- Passing on knowledge and teaching the next generation of developers
- Submitting documentation updates where you see fit or lacking.
- Making contributions to the code base.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Reactive (>= 6.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Punchclock:
Package | Downloads |
---|---|
fusillade
Package Description |
|
akavache.http
An HttpClient-based cache for HTTP requests based on Akavache |
GitHub repositories (5)
Showing the top 5 popular GitHub repositories that depend on Punchclock:
Repository | Stars |
---|---|
HMBSbige/BilibiliLiveRecordDownLoader
Bilibili 直播录制
|
|
reactiveui/Fusillade
An opinionated HTTP library for Mobile Development
|
|
flagbug/Espera
Espera is a media player that plays your music, YouTube videos, SoundCloud songs and has a special "party mode".
|
|
Clancey/gMusic
This is a multi platform music player.
|
|
HTBox/crisischeckin
Crisischeckin Humanitarian Toolbox repository
|
Version | Downloads | Last updated |
---|---|---|
3.4.143 | 8,159 | 5/2/2024 |
3.4.95-g63ed44e8a1 | 183 | 11/24/2022 |
3.4.3 | 125,531 | 2/1/2021 |
3.4.1 | 632 | 1/22/2021 |
3.3.2 | 38,471 | 10/23/2020 |
3.3.1-ge8d6934868 | 346 | 10/23/2020 |
3.2.7 | 4,049 | 7/28/2020 |
3.2.1 | 43,524 | 4/28/2020 |
3.1.1 | 102,299 | 3/21/2019 |
3.0.17 | 7,827 | 2/5/2019 |
2.1.0 | 56,062 | 9/3/2017 |
2.0.0 | 19,440 | 11/10/2016 |
1.2.0 | 100,420 | 10/10/2014 |
1.1.1 | 96,003 | 5/1/2014 |
1.1.0 | 2,036 | 12/5/2013 |
1.0.1.1 | 1,447 | 11/12/2013 |
1.0.0 | 1,320 | 10/9/2013 |