Skip to content

Commit b12adc3

Browse files
committed
feat: Add debugName parameter to YAJsonIsolate.
1 parent 6976fae commit b12adc3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/yet_another_json_isolate/lib/src/_isolates_io.dart

+8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ import 'package:async/async.dart';
88

99
// One instance manages one isolate
1010
class YAJsonIsolate {
11+
YAJsonIsolate({
12+
this.debugName,
13+
});
14+
15+
/// The debug name used for the isolate spawned by this instance.
16+
final String? debugName;
17+
1118
final _receivePort = ReceivePort();
1219
late final SendPort _sendPort;
1320
final _createdIsolate = Completer<void>();
@@ -26,6 +33,7 @@ class YAJsonIsolate {
2633
_receivePort.sendPort,
2734
onExit: _receivePort.sendPort,
2835
onError: _receivePort.sendPort,
36+
debugName: debugName,
2937
);
3038
_sendPort = await _events.next;
3139
_createdIsolate.complete();

0 commit comments

Comments
 (0)