[英]How is Dart Isolate implemented in Flutter for Android/ iOS?
I have a problem understanding Dart Isolates and how they are implemented in Flutter for Android/ iOS. This answer states that "Dart is compiled to native machine code (ARM, Intel, ...) executable and bundled with some native platform code (Java, Kotlin, Objective-C/Swift) to interact with the native platform."我在理解 Dart Isolates 以及它们是如何在 Flutter for Android/ iOS 中实现时遇到问题。这个答案指出“Dart 被编译为本地机器代码(ARM、Intel,...)可执行文件并与一些本地平台代码(Java , Kotlin, Objective-C/Swift) 与原生平台交互。”
When I use a Dart Isolate in Flutter, eg for Android, is the Isolate compiled to something like Workmanager , or does it "only" use the Dart Isolate itself?当我在 Flutter 中使用 Dart Isolate 时,例如对于 Android,Isolate 是否编译为Workmanager之类的东西,或者它“仅”使用 Dart Isolate 本身?
Flutter is a high level implementation of things, you don't need to think on processor level, system process level it is all handled by Target OS, Flutter 是事物的高级实现,您无需在处理器级别上思考,系统进程级别全部由 Target OS 处理,
On low level a Thread is a light-weight process that performs some task and uses system resources like CPU,在低级别上,线程是一个轻量级进程,它执行某些任务并使用系统资源,如 CPU,
As per ISOLATE specification根据 ISOLATE 规范
Each Dart isolate has a single thread of execution and shares no mutable objects with other isolates.每个 Dart isolate 都有一个执行线程,并且不与其他 isolate 共享可变对象。
Using Isolate you create a separate thread that handles the separate task without intercepting the main thread of your dart/flutter App,使用 Isolate 你可以创建一个单独的线程来处理单独的任务,而不会拦截你的 dart/flutter 应用程序的主线程,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.