reactiveui / punchclock Goto Github PK
View Code? Open in Web Editor NEWMake sure your asynchronous operations show up to work on time
License: MIT License
Make sure your asynchronous operations show up to work on time
License: MIT License
Has ResumeQueue been implemented yet?
readme says it supports Pause/Resume:
.PauseQueue();
.PauseQueue();
twice just to see what would happen and that doesn't "toggle" it :)(Thank you for all the awesome libraries btw)
Hi Paul,
I have a scenario where I want to change the maximumConcurrent value.
For example, when I know I'm going to have an intense sync happening I want to increase the amount of concurrent http requests. And, after I'm done, I want to lower it back.
Right now, as a consumer of punchclock, the only place where I can change that value is in the constructor of the queue instance.
First off, Simple, yet very elegant library!
The string keys preventing concurrent operations of the same key, is a very nice feature. I'd very much like to see a feature where there can be a restriction to also ignore operations with the same key if one already exists in the queue, equal to, or higher than the given priority.
This could be immensely useful in repeated operations, where you don't keep adding similar ops to the queue if one already exists.
Thoughts?
Is your feature request related to a problem? Please describe.
I want to add jittering (noise) to my http-request-queues for a specific endpoint.
Discovered Fusillade and it would be awesome to have this on OperationQueue.
Describe the solution you'd like
Trying to improve the performance of a system by adding randomness, as well as
trying to avoid limiting of some endpoint that requires noise.
Describe alternatives you've considered
Set maximumConcurrent to 1 and use:
Observable
.Return(Unit.Default)
.Delay(TimeSpan.FromMilliseconds(new Random().Next(min, max)))
http=>https
Dependencies such as Rx-Linq.
http=>https
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates await pending status checks. To force their creation now, click the checkbox below.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/workflows/ci-build.yml
.github/workflows/ci-buildAndRelease.yml
.github/workflows/lock.yml
dessant/lock-threads v5
src/Directory.build.props
Roslynator.Analyzers 4.12.1
stylecop.analyzers 1.2.0-beta.556
Nerdbank.GitVersioning 3.6.133
Microsoft.SourceLink.GitHub 8.0.0
src/Punchclock.Tests/Punchclock.Tests.csproj
coverlet.msbuild 6.0.2
PublicApiGenerator 11.1.0
DiffEngine 15.3.0
FluentAssertions 6.12.0
Xunit.StaFact 1.1.11
Xunit.SkippableFact 1.4.13
xunit.runner.visualstudio 2.8.0
xunit.runner.console 2.8.0
xunit 2.8.0
Microsoft.NET.Test.Sdk 17.9.0
Verify.Xunit 24.1.0
PublicApiGenerator 11.1.0
src/Punchclock/Punchclock.csproj
src/global.json
dotnet-sdk 8.0.10
Note: for support questions, please ask on StackOverflow: https://stackoverflow.com/questions/tagged/punchclock . This repository's issues are reserved for feature requests and bug reports.
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Limitation to System.Reactive < 4.0.0
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Ugrade a project with System.Reactive, Fusillade, Punchclock & Akavache.
I need to upgrade Akavache, but this needs System.Reactive >= 4.0.0
What is the expected behavior?
Being able to upgrade my packages to the latest version.
What is the motivation / use case for changing the behavior?
I can't apply fixes in new versions of other packages, because PunchClock (& Fusillade) blocks this.
Which versions of PunchClock, and which platform / OS are affected by this issue? Did this work in previous versions of PunchClock?
v2.1.0. is affected. v2.0.0 does not mention the limitation, but I'm not sure wether it's safe to downgrade to this version in combination with System.Reactive > 4.0.0
Other information (e.g. stacktraces, related issues, suggestions how to fix)
No suggestions, because I don't know why the limitation is needed.
As per #16 (comment) we have had to disable them until ReactiveUI v7 ships reactiveui/ReactiveUI#850 due to circular dependencies.
In PriorityQueue.DequeueAll, it calls down to Dequeue
in a loop which means that RemoveAt(0)
gets called repeatedly. This means that RemoveAt
logic that reallocates the _items
array fires repeatedly every time the current _size
drops below the 1/4 of then current capacity. If we're doing this against a really large queue, it could end up copying the _items
array elements repeatedly (and newing the items array a few times). It might be awesome to pass a emptying
flag down to a private overload ofDequeue
, which could forward that flag to RemoveAt
(either an private overload or just defaulted false
value on the current one). When the emptying
flag is true
, then we skip the _items
array reallocation and copy until the _size
falls to below the default capacity (currently 16).
https://github.com/paulcbetts/punchclock/blob/master/Punchclock%2FPriorityQueue.cs
I would be happy to submit a PR, but don't want to waste your time if this does seem to be an issue for you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.