Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Richard Gobeille
EDuke32
Commits
32742cb3
Commit
32742cb3
authored
Aug 02, 2022
by
Richard Gobeille
Browse files
asyncplusplus: update to bf6c7abd7f315d7f5838ef45f62f5febdce339f2
parent
24bcc863
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/build/include/libasync.h
View file @
32742cb3
...
...
@@ -917,7 +917,7 @@ struct LIBASYNC_CACHELINE_ALIGN task_base: public ref_count_base<task_base, task
void
run_continuation
(
Sched
&
sched
,
task_ptr
&&
cont
)
{
LIBASYNC_TRY
{
detail
::
schedule_task
(
sched
,
std
::
move
(
cont
)
)
;
detail
::
schedule_task
(
sched
,
cont
);
}
LIBASYNC_CATCH
(...)
{
// This is suboptimal, but better than letting the exception leak
cont
->
vtable
->
cancel
(
cont
.
get
(),
std
::
current_exception
());
...
...
@@ -2044,8 +2044,14 @@ public:
};
// Spawn a function asynchronously
#if (__cplusplus >= 201703L)
// Use std::invoke_result instead of std::result_of for C++17 or greater because std::result_of was deprecated in C++17 and removed in C++20
template
<
typename
Sched
,
typename
Func
>
task
<
typename
detail
::
remove_task
<
std
::
invoke_result_t
<
std
::
decay_t
<
Func
>>>::
type
>
spawn
(
Sched
&
sched
,
Func
&&
f
)
#else
template
<
typename
Sched
,
typename
Func
>
task
<
typename
detail
::
remove_task
<
typename
std
::
result_of
<
typename
std
::
decay
<
Func
>::
type
()
>::
type
>::
type
>
spawn
(
Sched
&
sched
,
Func
&&
f
)
#endif
{
// Using result_of in the function return type to work around bugs in the Intel
// C++ compiler.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment