Open ookami-kb opened 1 year ago
I know, the lack of an isolates integration is a problem for flutter-pi. I am Java developer, and thinking like a Java developer a created a helper class to integrate isolation with help of reflection and annotation some time ago
https://github.com/pezi/dart_periphery/blob/ps/0.9.4_isolate_api/lib/src/isolate_helper.dart
But this approach was a hasty action. dart:mirrors doesn't support AOT - therefore no flutter support. This code works only inside CLI based app.
Integreation isolate code by hand works. The only way to add isolate support for this project is to uses code generators like source_gen. In the next time I will do this step.
New subproject which handles isolates is available https://github.com/pezi/flutter-pi-sensor-tester
Is there any specific reason why all the API is sync and waiting is implemented with
sleep
instead ofawait
?I'm using the library with
flutter-pi
and for some reason, it doesn't work great with isolates. The library callssleep
throughout the code, making UI laggy.