multithreading - 使用 compute() 在不同线程中转换图像会杀死隔离
问题描述
基本上,我使用了一个隔离,使用 Image 包和 Foundation Isolate 从系统目录转换可变数量的图像文件。
await compute(xyzFunc, abcArg);
执行此操作的函数将获取参数中的图像路径列表
xyzFunc(abcArg) {
for(String path in abcArg) {
resize(path);
这将持续到某个时间点并抛出 main() spawn exited 的错误并出现一些错误。隔离物被杀死。任何地方都没有任何消息的迹象。在这方面需要帮助。enter code here
解决方案
推荐阅读
- ios - coredata 更新不正确
- python - 有没有办法在 python tkinter 窗口中流式传输在线视频?
- delphi - Windows 10 上 TabTip.exe(虚拟键盘)的大小和位置?
- jpa - 为什么 JPA getReference() 不能按预期工作?
- java - 如何让多个文本框以特定时间间隔沿随机方向行进?
- ruby-on-rails - 在 Rails 范围内使用 devise_for 设计生成的邮件 URL
- postgresql - PSQL 函数不能转义引号
- android - 有没有办法在片段中创建 MediaPlayer 而无需在创建时将 ResId 传递给它?
- php - 如何要求第三方的 index.php 也需要东西
- java - PopupWindow 与虚拟键盘重叠