Skip to content

self.spawn is a blocking function but is run on async threads #85

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

Open
weissi opened this issue Jun 16, 2025 · 0 comments
Open

self.spawn is a blocking function but is run on async threads #85

weissi opened this issue Jun 16, 2025 · 0 comments

Comments

@weissi
Copy link

weissi commented Jun 16, 2025

let spawnResults = try self.spawn(

execve/posix_spawn will block the child process (which is fine) but we also need to communicate information back into the parent process (to figure out if execve worked). That however may block, for example if we spawn an executable on a network'd file system. But in the code today, try self.spawn(...) is run on async threads which is a problem as it might block all asynchronous work from happening potentially indefinitely.

self.spawn should be offloaded onto a thread pool where blocking is okay.

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