Skip to content

Instantly share code, notes, and snippets.

View Palkiaa's full-sized avatar
🙂
What's happening?

Palkia Palkiaa

🙂
What's happening?
  • South Africa
  • 06:17 (UTC +02:00)
View GitHub Profile
@Palkiaa
Palkiaa / PauseTokenSource.cs
Created January 17, 2026 00:14 — forked from Dmdv/PauseTokenSource.cs
PauseTokenSource
// http://stackoverflow.com/a/19616899/1768303
// http://blogs.msdn.com/b/pfxteam/archive/2013/01/13/cooperatively-pausing-async-methods.aspx
// We want:
/*
Before pause requested
Before await pause.WaitWhilePausedAsync()
After pause requested.
After await pause.WaitWhilePausedAsync()
*/