dotnet / dotnet/dotnet-api-docs
BlockingCollection Examples using Generic Host (HostBuilder) and Async Main
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
Can we please have have Examples for .Net Core 2.1 using HostBuilder instead of spawning Threads manually. The current Examples are tidy enough but not leveraging the latest offerings of .Net Core 2.1 for thread management.
For context, the use case I have in mind is many micro services Adding to a common BlockingCollection. A single compute-heavy service reads one-at-a time from the BlockingCollection. All services contained within the same Host. I also intend to throttle the feeder services (and their upstream clients) based on the BlockingCollection.Count
Thanks for considering my suggestion.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: a434991e-5968-43c5-9d36-b66fc65b0fe0
* Version Independent ID: 239b5eed-5d59-5b14-6642-c8388425e269
* Content: [BlockingCollection<T> Class (System.Collections.Concurrent)](https://docs.microsoft.com/en-us/dotnet/api/system.collections.concurrent.blockingcollection-1?view=netcore-2.1)
* Content Source: [xml/System.Collections.Concurrent/BlockingCollection`1.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Collections.Concurrent/BlockingCollection`1.xml)
* Product: **dotnet-api**
* GitHub Login: @mairaw
* Microsoft Alias: **mairaw**
Contributor guide
Assessment
This issue has not been assessed yet.