diff --git a/packages/yet_another_json_isolate/lib/src/_isolates_io.dart b/packages/yet_another_json_isolate/lib/src/_isolates_io.dart index 07913afe..54d74ba1 100644 --- a/packages/yet_another_json_isolate/lib/src/_isolates_io.dart +++ b/packages/yet_another_json_isolate/lib/src/_isolates_io.dart @@ -8,6 +8,13 @@ import 'package:async/async.dart'; // One instance manages one isolate class YAJsonIsolate { + YAJsonIsolate({ + this.debugName, + }); + + /// The debug name used for the isolate spawned by this instance. + final String? debugName; + final _receivePort = ReceivePort(); late final SendPort _sendPort; final _createdIsolate = Completer(); @@ -26,6 +33,7 @@ class YAJsonIsolate { _receivePort.sendPort, onExit: _receivePort.sendPort, onError: _receivePort.sendPort, + debugName: debugName, ); _sendPort = await _events.next; _createdIsolate.complete(); diff --git a/packages/yet_another_json_isolate/lib/src/_isolates_web.dart b/packages/yet_another_json_isolate/lib/src/_isolates_web.dart index c88ad6c7..45790965 100644 --- a/packages/yet_another_json_isolate/lib/src/_isolates_web.dart +++ b/packages/yet_another_json_isolate/lib/src/_isolates_web.dart @@ -1,6 +1,10 @@ import 'dart:convert'; class YAJsonIsolate { + YAJsonIsolate({ + String? debugName, + }); + Future initialize() async {} Future dispose() async {}