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

Make FakeTask public on singlethreaded context #10517

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

NoahShomette
Copy link
Contributor

Objective

  • When compiling bevy for both singlethreaded and multithreaded contexts and using Task directly, you can run into errors where you expect a Task to be returned but FakeTask is instead. Due to FakeTask being private the only solution is to ignore the return at all however because it is returned that isn't totally clear. The error is confusing and doesn't provide a solution or help figuring it out.

Solution

  • Made FakeTask public and added brief documentation providing a use (none) that helps guide usage (no usage) of FakeTask.

@NoahShomette NoahShomette added the S-Needs-Triage This issue needs to be labelled label Nov 12, 2023
@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Tasks Tools for parallel and async work and removed S-Needs-Triage This issue needs to be labelled labels Nov 15, 2023
@alice-i-cecile
Copy link
Member

This was definitely intended to be publicly exported. Merging as trivial.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 15, 2023
@alice-i-cecile alice-i-cecile modified the milestone: 0.12.1 Nov 15, 2023
Merged via the queue into bevyengine:main with commit d0c9e21 Nov 15, 2023
25 checks passed
@NoahShomette NoahShomette deleted the FakeTask branch November 20, 2023 16:07
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

- When compiling bevy for both singlethreaded and multithreaded contexts
and using `Task` directly, you can run into errors where you expect a
`Task` to be returned but `FakeTask` is instead. Due to `FakeTask` being
private the only solution is to ignore the return at all however because
it *is* returned that isn't totally clear. The error is confusing and
doesn't provide a solution or help figuring it out.


## Solution

- Made `FakeTask` public and added brief documentation providing a use
(none) that helps guide usage (no usage) of FakeTask.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Tasks Tools for parallel and async work C-Usability A targeted quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants