commit | a24d776f25c78f7784080fb6e8c61be860243051 | [log] [tgz] |
---|---|---|
author | Chris Suter <csuter@google.com> | Tue May 23 17:27:23 2023 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue May 23 17:27:23 2023 +0000 |
tree | aaf81feb56cc86b39a5231d5118ee7bb2f76113b | |
parent | 172aa39a1c9d4804841527bee953e7d9c62ed27d [diff] |
[vfs] Rework how ExecutionScope's shutdown works This changes the way that ExecutionScope's shutdown feature works which simplifies most uses. With this new mechanism, after calling shutdown all tasks will continue running whilst at least one is considered active. A guard is used to mark a task as active. This will mean that some tasks run for longer than they might have done prior to this change, but this should not have any material difference. Tasks that want async behaviour to take place when they are dropped (rare) can spawn tasks from their drop functions and the executor will delay shutdown until these async tasks have finished. This results in a small decrease in binary size and it should take less runtime memory too, but the main benefit is that spawning tasks is simpler for the majority of uses. Change-Id: Ia904ab970746f7efc871120f7e83b205ff303c40 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/858276 Fuchsia-Auto-Submit: Chris Suter <csuter@google.com> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com> Reviewed-by: Adam Barth <abarth@google.com> Reviewed-by: Stephen Demos <sdemos@google.com> Reviewed-by: Ben Keller <galbanum@google.com>
Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.