-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make SendPort and ReceivePort generic #53962
Comments
Duplicate of #23059 |
Good find. And the issues mentioned on that issue still apply. A solution could be "TypeReveivePort"/"TypedSendPort" types which cannot be sent to isolated that are not in the same isolate group. It's very likely easier to just create wrappers yourself, or just do |
Right, I think limiting this to the case of isolates in the same group would still be useful. Although I agree that making our own wrappers is easy, they can't implement the original |
Closing as an SDK feature. If someone wants to make a package, or we want to add it to a resurrected package:isolate, then that is an option. |
Since my last comments, I published |
Currently,
SendPort.send
accepts anyObject?
, andReceivePort
implementsStream<dynamic>
. I see a nice opportunity to add some type safety here:Or even, with pattern matching:
/cc @mraleph from the Discord conversation. Also, see #53877 for a related proposal
The text was updated successfully, but these errors were encountered: