start method
Future<void>
start(
- Set<
String> options, - DaemonBuilder builder,
- ChangeProvider changeProvider, {
- Serializers? serializersOverride,
- bool shouldBuild(
- BuildTarget,
- Iterable<
WatchEvent>
- Duration timeout = defaultIdleTimeout,
Implementation
Future<void> start(
Set<String> options,
DaemonBuilder builder,
ChangeProvider changeProvider, {
Serializers? serializersOverride,
bool Function(BuildTarget, Iterable<WatchEvent>)? shouldBuild,
Duration timeout = defaultIdleTimeout,
}) async {
if (_server != null || _lock == null) return;
_handleGracefulExit();
_createVersionFile();
_createOptionsFile(options);
var server = _server = Server(
builder,
timeout,
changeProvider,
serializersOverride: serializersOverride,
shouldBuild: shouldBuild,
);
var port = await server.listen();
_createPortFile(port);
unawaited(server.onDone.then((exitCode) async {
await _cleanUp(exitCode);
}));
}