Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flutter_isolate does not actually spawn isolates since 2.1.0 #160

Open
srmncnk opened this issue Jan 23, 2025 · 1 comment
Open

flutter_isolate does not actually spawn isolates since 2.1.0 #160

srmncnk opened this issue Jan 23, 2025 · 1 comment

Comments

@srmncnk
Copy link

srmncnk commented Jan 23, 2025

What it says in the title.

The problematic commit

While using FlutterEngineGroup is a great idea in terms of memory consumption and sharing complex objects, it actually does not run in separate threads. I checked this by running this via ffi:

int64_t get_thread_id() {
  return (int64_t)syscall(SYS_gettid);
}

And it returned the same number for all the isolates spawned by flutter_isolate. For version 2.0.4 (which did not use FlutterEngineGroup yet), every thread id is a different number.

This is a bug and it should be addressed this way - behaviour in heavy-lifting apps drastically changes when doing a seemingly harmless upgrade from 2.0.4 to 2.10.

@srmncnk srmncnk changed the title fluter_isolate does not actually spawn isolates since 2.1.0 flutter_isolate does not actually spawn isolates since 2.1.0 Jan 23, 2025
@nmfisher
Copy link
Collaborator

Thanks @srmncnk - let me take a look at this next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants