Skip to content

Commit eb56318

Browse files
committed
Change backgroundTask to async
1 parent 5cfcffb commit eb56318

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/MailboxProcessorType.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ type MailboxProcessorType() =
256256
let isErrored = mb.Error |> Async.AwaitEvent |> Async.StartAsTask
257257

258258
let post =
259-
backgroundTask {
259+
async {
260260
while not cts.IsCancellationRequested do
261261
postEv.WaitOne() |> ignore
262262
mb.Post(fun () -> ())
263-
}
263+
} |> Async.StartAsTask
264264

265265
for i in 0 .. 10000 do
266266
if i % 2 = 0 then
@@ -298,11 +298,11 @@ type MailboxProcessorType() =
298298
let isErrored = mb.Error |> Async.AwaitEvent |> Async.StartAsTask
299299

300300
let post =
301-
backgroundTask {
301+
async {
302302
while not cts.IsCancellationRequested do
303303
postEv.WaitOne() |> ignore
304304
mb.Post(fun () -> ())
305-
}
305+
} |> Async.StartAsTask
306306

307307
for i in 0 .. 10000 do
308308
if i % 2 = 0 then

0 commit comments

Comments
 (0)