Created
January 31, 2026 08:31
-
-
Save amoerie/7f1f34af8012083976c96035da836dc3 to your computer and use it in GitHub Desktop.
Banning TaskCompletionSource without RunContinuationsAsynchronously
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // TaskCompletionSource should be constructed with TaskCreationOptions.RunContinuationsAsynchronously | |
| // to avoid potential synchronization context issues and deadlocks. | |
| // If you explicitly need the default behavior, use TaskCreationOptions.None. | |
| M:System.Threading.Tasks.TaskCompletionSource.#ctor(); Use new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously) or TaskCreationOptions.None if explicitly needed | |
| M:System.Threading.Tasks.TaskCompletionSource.#ctor(System.Object); Use new TaskCompletionSource(state, TaskCreationOptions.RunContinuationsAsynchronously) or TaskCreationOptions.None if explicitly needed | |
| M:System.Threading.Tasks.TaskCompletionSource`1.#ctor(); Use new TaskCompletionSource<T>(TaskCreationOptions.RunContinuationsAsynchronously) or TaskCreationOptions.None if explicitly needed | |
| M:System.Threading.Tasks.TaskCompletionSource`1.#ctor(System.Object); Use new TaskCompletionSource<T>(state, TaskCreationOptions.RunContinuationsAsynchronously) or TaskCreationOptions.None if explicitly needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment