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

Thread creation takes &mut FnMut instead of Fn #40

Open
chrysn opened this issue Feb 11, 2023 · 1 comment
Open

Thread creation takes &mut FnMut instead of Fn #40

chrysn opened this issue Feb 11, 2023 · 1 comment

Comments

@chrysn
Copy link
Member

chrysn commented Feb 11, 2023

In what retroactively appears weird, I've implemented thread creation to take an FnMut rather than an Fn.

No clue why, though -- fixing it will be a breaking change, but should otherwise be straightforward.

I'm holding it for the next round of breaking changes, which given #37 could be quite soon.

(Maybe we'll fix threads returning values at the same time; there there will be questions like "do we need awaitability all the time when we return values"; the question is probably yes, and they'd get a different launch API).

@chrysn
Copy link
Member Author

chrysn commented Feb 11, 2023

Might also solve #23 while at it -- tracked threads are not a thing, they would just be owned threads (where the ownership token may contain a lifetime when started in a scope).

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

1 participant