Merge branch 'master' into winui
This commit is contained in:
Коммит
2216723765
|
@ -6,7 +6,7 @@ int crossThreadReturnedValue = await Task.Run<int>( async () =>
|
|||
{
|
||||
// Task.Run() will guarantee the given piece of code be executed on a separate thread pool.
|
||||
// This is used to simulate the scenario of updating the UI element from a different thread.
|
||||
int returnedFromUIThread = await dispatcherQueue.ExecuteOnUIThreadAsync<int>(() =>
|
||||
int returnedFromUIThread = await dispatcherQueue.EnqueueAsync<int>(() =>
|
||||
{
|
||||
NormalTextBlock.Text = "Updated from a random thread!";
|
||||
return 1;
|
||||
|
@ -18,4 +18,4 @@ int crossThreadReturnedValue = await Task.Run<int>( async () =>
|
|||
});
|
||||
|
||||
|
||||
NormalTextBlock.Text += $" And the value {crossThreadReturnedValue} was also returned successfully!";
|
||||
NormalTextBlock.Text += $" And the value {crossThreadReturnedValue} was also returned successfully!";
|
||||
|
|
Загрузка…
Ссылка в новой задаче