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

Lifetime based Handles #221

Open
ishitatsuyuki opened this issue Jun 19, 2017 · 2 comments
Open

Lifetime based Handles #221

ishitatsuyuki opened this issue Jun 19, 2017 · 2 comments

Comments

@ishitatsuyuki
Copy link

Currently the Core is using a reference counter to create handles. However, I believe this can be elided with lifetimes.

Implementation notes:

  • spawn() should take 'a (outlives Core) instead of 'static.
  • technically Remote doesn't require a lifetime (it uses mpsc), but I think it should have PhantomData for consistency.
  • hacks required for CURRENT_LOOP.
@alexcrichton
Copy link
Contributor

Is a reference count a problem?

@carllerche
Copy link
Member

Down the road, I will probably try exploring making Core generic over the task type (though the primary API will remain without the generic). This would primarily be to be able to remove the required alloctions but could also potentially be used for adding lifetimes.

Though, again it isn't high priority and not an immediate concern.

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

3 participants