This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:dart_periphery/dart_periphery.dart'; | |
import 'dart:io'; | |
class SerialIsolateExample { | |
@InitJob() | |
static InitJobResult initJob() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:dart_periphery/src/isolate_helper.dart'; | |
import 'dummy.dart'; | |
class SomeClass { | |
static int counter = 0; | |
@InitJob() | |
static InitJobResult initJob() { | |
var dev = DummyDev(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://dart.dev/guides/language/concurrency | |
// https://dart.dev/guides/language/concurrency | |
// https://github.com/dart-lang/samples/blob/master/isolates/bin/long_running_isolate.dart | |
// https://stackoverflow.com/questions/42611880/difference-between-await-for-and-listen-in-dart | |
import 'dart:isolate'; | |
import 'dart:async'; | |
import 'package:async/async.dart'; | |
import 'package:dart_periphery/dart_periphery.dart'; | |
import 'dart:io'; |