Skip to content

Commit dd4d45e

Browse files
authored
final_suspend (#644)
1 parent 82fa8ec commit dd4d45e

File tree

6 files changed

+294
-439
lines changed

6 files changed

+294
-439
lines changed

strings/base_coroutine_foundation.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,11 @@ namespace winrt::impl
497497

498498
auto final_suspend() noexcept
499499
{
500+
if (winrt_suspend_handler)
501+
{
502+
winrt_suspend_handler(this);
503+
}
504+
500505
return final_suspend_awaiter{ this };
501506
}
502507

strings/base_coroutine_threadpool.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,11 @@ namespace std::experimental
526526

527527
suspend_never final_suspend() const noexcept
528528
{
529+
if (winrt_suspend_handler)
530+
{
531+
winrt_suspend_handler(this);
532+
}
533+
529534
return{};
530535
}
531536

0 commit comments

Comments
 (0)