Skip to content

NEW pipeline class#415

Merged
gaborcsardi merged 14 commits into
mainfrom
feature/pipelines
Apr 22, 2026
Merged

NEW pipeline class#415
gaborcsardi merged 14 commits into
mainfrom
feature/pipelines

Conversation

@gaborcsardi
Copy link
Copy Markdown
Member

New experimental pipeline R6 class for running two or more processes
connected by kernel-level pipes, like a Unix shell pipeline
(cmd1 | cmd2 | cmd3). Data flows directly between child processes
without passing through R. Works on Unix and Windows (eventually).

Closes #280.

On Linux, `process$get_start_time()` now returns the correct wall-clock
start time. Previously it was systematically ~0.3–0.5 s too early because
the boot time was read from `/proc/stat btime`, which is truncated to whole
seconds. processx now derives the boot time from
`CLOCK_REALTIME − CLOCK_MONOTONIC`, which has nanosecond precision. The
ps package is updated in tandem to accept handles created by either the old
or the new method, so new ps + old processx continues to work (#394, #402).

Closes #394, closes #402.
Until the release we need to refer to the dev docs.
- Mark unix specific tests as such.
- Add some platform independent tests using px.
Create pipes and processes iteratively, so the first process will
not inherit the pipes of other processes, etc.

Does not matter on Unix, because of CLOEXEC, but it does matter
on Windows.
@gaborcsardi gaborcsardi merged commit 00c5881 into main Apr 22, 2026
21 checks passed
@gaborcsardi gaborcsardi deleted the feature/pipelines branch April 22, 2026 09:42
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.

Support pipelines

1 participant