feat: support concurrency limit#542
Open
thep0y wants to merge 3 commits intoreact-component:masterfrom
Open
Conversation
When enabling multi-file upload, you can control the concurrency by providing the `concurrencyLimit` property. The `concurrencyLimit` property creates a `ConcurrencyRequester` instance, storing all requests in the instance's queue. The concurrent upload task quantity is restricted by the `concurrencyLimit` when using the `send` method of the instance at the end of the `uploadFiles` process.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #542 +/- ##
===========================================
- Coverage 87.21% 75.07% -12.15%
===========================================
Files 6 7 +1
Lines 266 325 +59
Branches 72 79 +7
===========================================
+ Hits 232 244 +12
- Misses 34 81 +47 ☔ View full report in Codecov by Sentry. |
- Use type imports in concurrencyRequest.ts for better clarity. - Extract XHR load event handling into a separate function, onXHRLoad, in request.ts. - Update references to onXHRLoad in both concurrencyRequest.ts and request.ts.
Member
|
覆盖率得想办法补一下。 |
Author
试过了,并发请求的测试实再不知道怎么写 |
Member
Member
|
@zombieJ 这个的用例来帮忙补一下? |
|
This could be a useful feature to control browser resource usage with batch file uploads. Any chance this would be merged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When enabling multi-file upload, you can control the concurrency by providing the
concurrencyLimitproperty.The
concurrencyLimitproperty creates aConcurrencyRequesterinstance, storing all requests in the instance's queue. The concurrent upload task quantity is restricted by theconcurrencyLimitwhen using thesendmethod of the instance at the end of theuploadFilesprocess.