close method
Stops accepting new tasks, then waits within for the running ones.
Returns true when everything finished, and false when the budget passed
with work still going — the same contract as ServerHandle.close, and the
only signal that something was abandoned.
Implementation
Future<bool> close({Duration within = const Duration(seconds: 15)}) async {
_closed = true;
return settled(within);
}