-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AsyncSeq.mapAsyncUnorderedParallel #157
base: main
Are you sure you want to change the base?
Conversation
My first contribution |
@@ -0,0 +1,24 @@ | |||
using System.Threading.Channels; | |||
namespace Helper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why this helper can't be written in F#?
let inline (|AbsPosRangeByLength|_|) (start,length) = if start >= GenericZero && length > GenericZero then Some (start,length) else None | ||
let inline private AsyncSequenceProduce (dataChannel:Channel<'a>) producer source = | ||
async{ | ||
let Mutex = new Mutex(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like this should be using https://learn.microsoft.com/en-us/dotnet/api/system.threading.interlocked.increment?view=net-6.0?
@Xyncgas I left some initial comments - we'd need tests too. Any reason this doesn't go direct into the main library? |
I didn't want to put stuff into the folder but created a separate one because I didn't know what to do |
@abelbraaksma Should we close this old one out? |
I implemented mapAsyncUnorderedParallel
Can someone please help me to add it into the AsyncSeq library we are using