Skip to content

Instantly share code, notes, and snippets.

// 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() {
import 'package:dart_periphery/src/isolate_helper.dart';
import 'dummy.dart';
class SomeClass {
static int counter = 0;
@InitJob()
static InitJobResult initJob() {
var dev = DummyDev();
// 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';