Skip to content

Make all process operators interruptible#430

Open
reibitto wants to merge 9 commits intoseries/2.xfrom
improve-interruption
Open

Make all process operators interruptible#430
reibitto wants to merge 9 commits intoseries/2.xfrom
improve-interruption

Conversation

@reibitto
Copy link
Contributor

Closes #425

Methods like exitCode were interruptible but in particular the stream operators weren't interruptible. That should be fixed now.

Also Scala.js and Scala Native interruption weren't working at all. I wasn't familiar with either Scala.js and Scala Native or the implementations that were added, but I managed to get Scala.js interruption fully working. Scala Native interruption is only partially working but it's an improvement over the previous state of things. Particularly .timeout(...) isn't interrupting the process. Nothing I do works so perhaps it's Scala Native limitation currently. I'll keep an eye on it and see if a future Scala Native upgrade fixes the internal waitFor method.

As part of this, I added proper tests for interruption for each operator (not just exitCode). It's confirmed to be working.

@reibitto reibitto mentioned this pull request Aug 19, 2024
@hearnadam
Copy link
Collaborator

@reibitto would love to get this merged. Would you be willing to pick this back up?

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

Successfully merging this pull request may close these issues.

Process.stdout.linesStream is not interruptible

2 participants