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

Spawned Tasks Are not Running Detatched With Smol Executor #36

Open
zicklag opened this issue Sep 15, 2021 · 2 comments
Open

Spawned Tasks Are not Running Detatched With Smol Executor #36

zicklag opened this issue Sep 15, 2021 · 2 comments

Comments

@zicklag
Copy link

zicklag commented Sep 15, 2021

When I run use agnostik::spawn to spawn a task with the Smol executor feature, the task is not actually running unless I await the join handle.

I expected that the task should spawned in the "background" so to speak so I could continue executing other async code while it runs. Smol accomplishes this by detach()-ing the task, but then you can't await on it after that so that seems like it breaks the agnostik::JoinHandle. 🤔 Not sure how we want to handle that.

@chpio
Copy link
Contributor

chpio commented Jul 17, 2023

Hmm, not sure if this is even desirable. You can (and should!) use structured concurrency.

@zicklag
Copy link
Author

zicklag commented Jul 24, 2023

I'm not using agnostik at this point, so I'm not firmly set on any direction.

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

2 participants