acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
aaa_thread.h
1
#pragma once
2
3
4
template
<
typename
PRED >
5
void
defer_main_thread(PRED pred)
6
{
7
8
if
(::winrt::Windows::ApplicationModel::Core::CoreApplication::MainView->CoreWindow->Dispatcher->HasThreadAccess)
9
{
10
11
pred();
12
13
}
14
else
15
{
16
17
::wait(
18
::winrt::Windows::ApplicationModel::Core::CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(
19
::winrt::Windows::UI::Core::CoreDispatcherPriority::Normal,
20
ref
aaa_primitive_new ::winrt::Windows::UI::Core::DispatchedHandler([&pred]()
21
{
22
23
pred();
24
25
})));
26
27
}
28
29
}
ref
Definition
cfref.h:37
operating_system
uwp
aaa_thread.h
Generated by
1.17.0