Skip to content

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

Open
@weissi

Description

@weissi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions