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

Adapt classes with isolates #1867

Closed
AlexV525 opened this issue Jun 15, 2023 · 3 comments
Closed

Adapt classes with isolates #1867

AlexV525 opened this issue Jun 15, 2023 · 3 comments
Labels
i: wontfix This will not be worked on

Comments

@AlexV525
Copy link
Member

Request Statement

flutter/flutter#126520 (comment)

Recent versions of the Dart SDK have tightened the rules for which objects can be sent across isolates (see https://api.dart.dev/stable/3.0.0/dart-isolate/SendPort/send.html and dart-lang/sdk@67683c39)

Classes might cause unsendable issues when passing through isolates. Someone reported that MultipartFile is not sendable which fails the runtime.

image

Solution Brainstorm

Make those classes sendable, or figure out ways to handle them in isolates.

@AlexV525 AlexV525 added the s: feature This issue indicates a feature request label Jun 15, 2023
@AlexV525
Copy link
Member Author

cc @kuhnroyal I saw a related request in OpenAPITools/openapi-generator#15516, could you check if we're capable to adapt similar changes as well?

@kuhnroyal
Copy link
Member

The PR you linked involves types sent to an isolate due to generator code during encoding/decoding.
Here I don't believe this is something that dio is doing. The easy answer is, don't try to send complex types through a SendPort.

@AlexV525
Copy link
Member Author

Great, thanks for the feedback!

@AlexV525 AlexV525 added i: wontfix This will not be worked on and removed s: feature This issue indicates a feature request labels Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i: wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants