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
Loading
Please register or sign in to comment