Skip to content

Commit 9a245a3

Browse files
authored
Fix sample bug
1 parent df4a6e5 commit 9a245a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/library_with_jtf.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ internal class SomeUserOfJTF
7171
[Import]
7272
ThreadingContext ThreadingContext { get; set; }
7373

74-
public async Task SomeMainThreadMethodAsync()
74+
public async Task SomeMainThreadMethodAsync(CancellationToken cancellationToken)
7575
{
76-
await this.ThreadingContext.JoinableTaskContext.SwitchToMainThreadAsync();
76+
await this.ThreadingContext.JoinableTaskContext.Factory.SwitchToMainThreadAsync(cancellationToken);
7777
// Do work here.
7878
}
7979
}

0 commit comments

Comments
 (0)