Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a nothrow task with tests #540

Merged
merged 5 commits into from
Jun 23, 2023
Merged

Conversation

jesswong
Copy link
Contributor

Modifies task.hpp to include nothrow_task. The behavior for nothrow_task and task.hpp is mostly the same, with the difference being nothrow_task calling std::terminate when an exception is thrown. Part of the motivation is to create a task that's smaller in binary size compared to task by minimizing the use of exceptions.

The other difference is that the scheduler affinity in nothrow_task and task is slightly different, as illustrated by the tests.

@jesswong jesswong requested review from janondrusek and ispeters June 14, 2023 23:51
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 14, 2023
Copy link
Contributor

@ispeters ispeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! I wonder if my suggestion in connect_awaitable.hpp addresses the MSVC build error.

include/unifex/connect_awaitable.hpp Outdated Show resolved Hide resolved
include/unifex/task.hpp Outdated Show resolved Hide resolved
include/unifex/task.hpp Outdated Show resolved Hide resolved
include/unifex/task.hpp Show resolved Hide resolved
include/unifex/task.hpp Show resolved Hide resolved
test/noexcept_task_test.cpp Outdated Show resolved Hide resolved
test/noexcept_task_test.cpp Outdated Show resolved Hide resolved
test/noexcept_task_test.cpp Outdated Show resolved Hide resolved
@jesswong jesswong marked this pull request as ready for review June 20, 2023 22:45
@jesswong jesswong merged commit cf9e9eb into facebookexperimental:main Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants