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
/// <summary><p>Runs the asynchronous computation in a background context threadpool thread and awaits its result,
51
+
/// blocking the calling thread.</p><p>Any exception raised by the computation is propagated to the caller, with a potentially truncated stack-trace.</p></summary>
52
+
/// <remarks>
53
+
/// <p>The computation runs on the current thread when
54
+
/// <seecref="P:System.Threading.SynchronizationContext.Current"/> is <c>null</c>,
55
+
/// <seecref="P:System.Threading.Thread.IsThreadPoolThread"/> is <c>true</c>, and no timeout is specified.
56
+
/// Otherwise — which includes F# interactive sessions and GUI threads — it is offloaded to the thread
57
+
/// pool while the calling thread blocks; in that case exception stack traces will be incomplete,
58
+
/// showing only thread-pool frames and omitting the caller's frame.</p>
59
+
/// <p>For F# interactive, F# scripts, and unit tests where complete exception stack traces are desired,
60
+
/// prefer <seecref="M:Microsoft.FSharp.Control.FSharpAsync.RunSynchronouslyImmediate``1"/>, which
61
+
/// always starts on the calling thread. (Note that overload does not support a timeout, and blocking the foreground thread can lead to deadlock).
62
+
/// </p>
65
63
/// </remarks>
66
64
///
67
65
/// <paramname="computation">The computation to run.</param>
68
66
/// <paramname="timeout">The number of milliseconds to wait for the result of the
69
67
/// computation before raising a <seecref="T:System.TimeoutException"/>. If no value or -1 is provided
70
68
/// the timeout will be <seecref="F:System.Threading.Timeout.Infinite"/>.</param>
71
69
/// <paramname="cancellationToken">The cancellation token to be associated with the computation.
72
-
/// If one is not supplied, the default cancellation token is used.</param>
70
+
/// If omitted, <c>Async.DefaultCancellationToken</c> is used.</param>
73
71
///
74
72
/// <returns>The result of the computation.</returns>
/// Prints "A", "B" immediately (on the calling thread), then "C" (from a thread-pool thread), then "D" in 1 second (on the calling thread). Yields <c>result = 17</c>.
136
+
/// Prints "A", "B" immediately (on the calling thread), then, after one second, "C" (from a thread-pool thread),
137
+
/// quickly followed by "D" (on the calling thread). Yields <c>result = 17</c>.
0 commit comments