Perhaps you can write your computation so that it is composed of tasks
that each only run for a few milliseconds.
Then you can do the following:
import 'dart:async';
processTasks() {
Stopwatch sw = new Stopwatch()..start();
do {
processTask();
} while (sw.elapsedMilliseconds < 15);
Timer.run(processTasks);
}
This should allow the isolate to process incoming messages within 15
milliseconds.
With this setup you can send a message to the isolate to tell it to
pause or resume.
Cheers,
Peter
> --
> For other discussions, see
https://groups.google.com/a/dartlang.org/
>
> For HOWTO questions, visit
http://stackoverflow.com/tags/dart
>
> To file a bug report or feature request, go to
http://www.dartbug.com/new
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
misc+uns...@dartlang.org.