Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 4 additions & 0 deletions packages/yet_another_json_isolate/lib/src/_isolates_web.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import 'dart:convert';

class YAJsonIsolate {
YAJsonIsolate({
String? debugName,
});

Future<void> initialize() async {}

Future<void> dispose() async {}
Expand Down