You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling Async.RunSynchronously in libraries is error-prone and can cause dead-locks. (e.g. when running on the main interactive thread.) I would just remove the two functions toList and toArray altogether to prevent library users from hitting hard-to-debug issues.
It's true, though I certainly remember using these when playing around with AsyncSeq, testing and so on. Perhaps renaming to toListSynchronously and and toArraySynchronously may be right for now?
I'd second the rename. I agree that use of Async.RunSynchronously is troublesome and that these operations conceal it (particularly from a code quality scanner).
blumu
pushed a commit
to blumu/FSharp.Control.AsyncSeq
that referenced
this issue
Jan 13, 2019
dsyme
changed the title
toList and toArray should not call Async.RunSynchronously
Rename toList/toArray to toListSynchronously/toArraySynchronously
Jul 22, 2020
Calling
Async.RunSynchronously
in libraries is error-prone and can cause dead-locks. (e.g. when running on the main interactive thread.) I would just remove the two functionstoList
andtoArray
altogether to prevent library users from hitting hard-to-debug issues.FSharp.Control.AsyncSeq/src/FSharp.Control.AsyncSeq/AsyncSeq.fs
Line 1317 in 9b608ff
FSharp.Control.AsyncSeq/src/FSharp.Control.AsyncSeq/AsyncSeq.fs
Line 1318 in 9b608ff
The text was updated successfully, but these errors were encountered: