Comments (1)
Both your solutions work the same way here. If yield!
were implemented (not sure it has, since then), it would act the same as your first solution here. After all, sequences are delay-iterated.
If you want the whole result at once, then AsyncSeq
is probably not the correct solution. Though, if you already have an Async<seq>
, and you want to read all at once, you can just do Async.map Seq.toList
.
If you do want AsyncSeq
, it'll give you different behavior than you describe, but the solution in your first suggestion above does give you what you want.
For posterity, since a few days, taskSeq
was released. In there, you can do taskSeq { yield! items }
.
from fsharp.control.asyncseq.
Related Issues (20)
- Best way to convert System.Collections.Generic.IAsyncEnumerable<'t> to AsyncSeq<'t>? HOT 6
- iterAsyncParallel and iterAsyncParallelThrottled may fail to cancel
- Support .NET Standard 2.0 HOT 6
- Combination of groupBy and mapAsync involving access to the group causes deadlock. HOT 2
- [Feature] Can we have sort, sortBy, sortDescending and sortByDescending methods for AsyncSeq? HOT 3
- Update to use github actions
- netstandard2.1 only target forbids using the library in .net framework HOT 3
- asyncSeq not available HOT 6
- Currently broken with Fable HOT 7
- TaskSeq? HOT 6
- AsyncSeq deadlocks in Blazor WASM environment HOT 2
- AsyncSeq.mapAsyncParallel alternatives HOT 3
- Suggest to add a `chunkBy` function (to group and yield adjacent items sharing the same key) to the library HOT 4
- [General Question] HOT 2
- Deprecate `FSharp.Control.IAsyncEnumerable` in favor of the same type in BCL
- [Question] AsyncSeq.MapAsyncParallel HOT 2
- [Question] How to reduce Async<unit[]> HOT 1
- making AsyncSeq.mergeAll to accept array maybe
- Nuget package license link = 404 not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.control.asyncseq.