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

isolates API change: spawn functions should return a Future<SendPort> #4329

Closed
sigmundch opened this issue Aug 2, 2012 · 13 comments
Closed
Assignees
Labels
area-library closed-obsolete Closed as the reported issue is no longer relevant library-isolate

Comments

@sigmundch
Copy link
Member

We discussed this long time ago, but I don't believe we wrote a bug for it.

Short story:

Currently [spawnFunction] returns a [SendPort], and we should change it to return a [Future<SendPort>].

Long story:

In dart2js we can't resolve the port synchronously when this is implemented on top of web workers. We got a long-way with the current API by creating a buffering port. This is a port that buffers sent messages until the underlying port gets resolved (creating the illusion that the port is available synchronously).

This trick meant works great while you only send messages from that port. The problem is once you try to serialize that send port and sending it over a different port. At that point, we can no longer preserve the ordering guarantees unless we 'block' the other port.

It seems that at this point the system grows to be too complex.

@sigmundch
Copy link
Member Author

Added Library-Isolates label.

@sigmundch
Copy link
Member Author

Removed Isolates label.

@justinfagnani
Copy link
Contributor

If we even have a standard way of spawning remote isolates this will likely be a problem there as well. Such a spawnRemote() function will certainly have to return a Future.

@justinfagnani
Copy link
Contributor

Set owner to @justinfagnani.
Added this to the M2 milestone.
Added Started label.

@anders-sandholm
Copy link
Contributor

Removed this from the M2 milestone.
Added this to the M3 milestone.

@dgrove
Copy link
Contributor

dgrove commented Jan 11, 2013

Added Library-Isolate label.

@dgrove
Copy link
Contributor

dgrove commented Jan 11, 2013

Removed Library-Isolates label.

@anders-sandholm
Copy link
Contributor

Removed this from the M3 milestone.
Added this to the M4 milestone.

@larsbak
Copy link

larsbak commented May 28, 2013

Removed this from the M4 milestone.
Added this to the M5 milestone.

@kasperl
Copy link

kasperl commented Jun 4, 2014

Removed this from the M5 milestone.
Added this to the 1.6 milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the 1.6 milestone.
Added Oldschool-Milestone-1.6 label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-1.6 label.

@lrhn
Copy link
Member

lrhn commented Sep 18, 2014

Added AssumedStale label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-library closed-obsolete Closed as the reported issue is no longer relevant library-isolate
Projects
None yet
Development

No branches or pull requests

7 participants