Skip to content

Commit

Permalink
feat: Add debugName parameter to YAJsonIsolate.
Browse files Browse the repository at this point in the history
  • Loading branch information
misha committed Feb 14, 2025
1 parent 6976fae commit b12adc3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/yet_another_json_isolate/lib/src/_isolates_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>();
Expand All @@ -26,6 +33,7 @@ class YAJsonIsolate {
_receivePort.sendPort,
onExit: _receivePort.sendPort,
onError: _receivePort.sendPort,
debugName: debugName,
);
_sendPort = await _events.next;
_createdIsolate.complete();
Expand Down

0 comments on commit b12adc3

Please sign in to comment.