[roll] Roll fuchsia [starnix] Creates a builder-based API for dynamic_thread_spawner.

This only modifies `dynamic_thread_spawner`, the rest of the
refactor will be done piecemeal in separate changes.

In anticipation of more options to the zoo of "spawn" methods on
`DynamicThreadSpawner`, I refactored its API to use a typestate-based
builder pattern. The typestate builder only ever allows valid states to
be represented when building a spawn request. This makes using it very
straightforward. The tradeoff is a somewhat verbose declaration of the
builder methods.

This required a lot of noisy template parameterization, which is
something that should be avoided unless absolutely necessary. On the
flip side, it makes it impossible for the user of this API to
misconfigure a spawn request.

I experimented with a builder that does not use typestate. It turned out
that the API has enough confusing corner cases that it would be
decidedly more difficult to use correctly.

For this reason I am now convinced that typestate, however noisy, is the
correct choice between the alternatives.

Another good outcome of this refactor is that the DynamicThreadSpawner
API was split into two APIs with narrower concerns: the Builder API
deals only with configuring the spawn request correctly. The Spawner API
only deals with spawning tasks.

Original-Bug: 465144050
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1439505
Original-Revision: a998ecb342ad2e11699d817cbf442be80b3741b7
GitOrigin-RevId: 2b2b40cbd7b8b2f708705d14734bced23c387c39
Change-Id: Id1e3f4d201d8047df69906148d35565224398dce
1 file changed
tree: 31669e1aa38a7fab9f197197100829d453675b93
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. flower
  6. jiri.lock
  7. MILESTONE
  8. minimal
  9. prebuilts
  10. README.md
  11. stem
  12. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.