-
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
BufferByCountAndTime impact to Async.StartWithContinuations #65
Comments
Hi thanks for reporting, I'll take a look. I think it's the blocking call
to Task.Wait that causes this.
…On Thu, Apr 20, 2017 at 8:36 AM vaspas ***@***.***> wrote:
Description
Async.StartWithContinuations call is blocked when using
AsyncSeq.BufferByCountAndTime in async operation.
Repro steps
let op =
asyncSeq{
while true do
yield 0
}
|> AsyncSeq.bufferByCountAndTime 10 1000
|> AsyncSeq.iter (printf "%A ")
let cts = new System.Threading.CancellationTokenSource()
Async.StartWithContinuations(op, ignore, ignore, ignore, cts.Token)
Expected behavior
Async.StartWithContinuations call is returned
Actual behavior
Async.StartWithContinuations call blocks thread.
Known workarounds Related information
- Windows 10
- FSharp.Control.AsyncSeq (2.0.11)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#65>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAlOdpq6zOYa0OmppUhxQYijT3oLSXeIks5rx1FQgaJpZM4NC97o>
.
|
Hey, following up on this. It looks like the issue is the Printf.kfprintf (fun _ -> Console.Out.WriteLine()) Console.Out "%A" x and Odd. |
Hello. I have added waiting in example above. |
To clarify my comment, things work as expected if you use |
Only iterAsync with do! Async.SwitchToThreadPool () works for me. |
Description
Async.StartWithContinuations call is blocked when using AsyncSeq.BufferByCountAndTime in async operation.
Repro steps
let op =
asyncSeq{
while true do
do! Async.Sleep 1000
yield 0
}
|> AsyncSeq.bufferByCountAndTime 10 1000
|> AsyncSeq.iter (printf "%A ")
let cts = new System.Threading.CancellationTokenSource()
Async.StartWithContinuations(op, ignore, ignore, ignore, cts.Token)
Expected behavior
Async.StartWithContinuations call is returned
Actual behavior
Async.StartWithContinuations call blocks thread.
Known workarounds
Related information
The text was updated successfully, but these errors were encountered: