Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bc223143 authored by Chris Morin's avatar Chris Morin
Browse files

Have DumpPool return futures

Have DumpPool return futures when tasks are enqueued, instead of
having users register their task with a string. This change has the
following benefits:

* Simplifies DumpPool since it no longer needs to keep the map of
  strings to futures.

* Allows adding a set of tasks to DumpPool that might not be known at
  build time. For example, we can add a bunch of tasks from a vector,
  without needing to generate arbitrary strings for them.

* Reduces the ability to misuse DumpPool. Before this change, the user
  had to come up with strings representing each task, and needed to
  know a task with said name existed. This change moves it from being a
  runtime error to being a compile time one.

Test: atest dumpstate_smoke_test

Change-Id: Ic6c1a983b049e5236ac596e8af200a21c07ac31b
parent d12d361a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment