bevyengine / bevyengine/bevy

bevy_tasks: Drop static TaskPools or wait until all tasks are finished

Open
#18,665 0 comments 0 reactions 1 assignee Claimed by @james7132 View on GitHub
A-Tasks C-Feature S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

I'd like to make sure there's no more remaining work on the static task pools when exiting the application or just when freeing the engine.

## What solution would you like?

I'd like to be able to drop the static task pools such as the [ComputeTaskPool](https://docs.rs/bevy_tasks/latest/bevy_tasks/struct.ComputeTaskPool.html) to make sure their work is done and their threads are "joined".

It would be nice to have the option to:
- Wait until all queued work is done
- Cancel remaining work
- Drop the TaskPool and join the threads

## What alternative(s) have you considered?

Not all of the things I listed but just waiting for all queued work to be completed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.