dart中isolate操作示例代码
代码语言:dart
所属分类:通讯
代码描述:dart中isolate操作示例代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
import 'dart:async'; import 'dart:isolate'; main() async { var receivePort = new ReceivePort(); await Isolate.spawn(echo, receivePort.sendPort); // The 'echo' isolate sends it's SendPort as the first message var sendPort = await receivePort.first; var msg = await sendReceive(sendPort, "foo"); print('received $.........完整代码请登录后点击上方下载按钮下载查看
网友评论0