File tree 2 files changed +12
-0
lines changed
packages/yet_another_json_isolate/lib/src 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ import 'package:async/async.dart';
8
8
9
9
// One instance manages one isolate
10
10
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
+
11
18
final _receivePort = ReceivePort ();
12
19
late final SendPort _sendPort;
13
20
final _createdIsolate = Completer <void >();
@@ -26,6 +33,7 @@ class YAJsonIsolate {
26
33
_receivePort.sendPort,
27
34
onExit: _receivePort.sendPort,
28
35
onError: _receivePort.sendPort,
36
+ debugName: debugName,
29
37
);
30
38
_sendPort = await _events.next;
31
39
_createdIsolate.complete ();
Original file line number Diff line number Diff line change 1
1
import 'dart:convert' ;
2
2
3
3
class YAJsonIsolate {
4
+ YAJsonIsolate ({
5
+ String ? debugName,
6
+ });
7
+
4
8
Future <void > initialize () async {}
5
9
6
10
Future <void > dispose () async {}
You can’t perform that action at this time.
0 commit comments