complete method
Waits for work to finish and cleans up resources.
This method should be called after a build has completed. After the returned Future completes then all outputs have been written.
Implementation
Future<void> complete() async {
await Future.wait(_writeResults.map(Result.release));
}