Skip to content

Commit 2dd3a6b

Browse files
committed
FIFO and Unix Sockets docs improvements
- add NEWS - add 'experimental' lifecycle badges - comment on sockets being better - link to internal vignette
1 parent 4fa532e commit 2dd3a6b

12 files changed

Lines changed: 42 additions & 0 deletions

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11

22
# processx development version
33

4+
* New functions for creating portable FIFOs and Unix socket connections.
5+
See `conn_create_fifo()`, `conn_create_unix_socket()` and
6+
`vignettes/internals.Rmd` for documentation. These functions are currently
7+
experimental.
8+
49
# processx 3.6.1
510

611
* processx now closes file unneeded file descriptors when redirecting

R/connections.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ conn_create_fd <- function(fd, encoding = "", close = TRUE) {
2929

3030
#' Processx FIFOs
3131
#'
32+
#' @description
33+
#' `r lifecycle::badge("experimental")`
34+
#'
3235
#' Create a FIFO for inter-process communication
3336
#' Note that these functions are currently experimental.
3437
#'
@@ -42,6 +45,9 @@ conn_create_fd <- function(fd, encoding = "", close = TRUE) {
4245
#'
4346
#' # Notes
4447
#'
48+
#' ## In general Unix domain sockets work better than FIFOs, so we suggest
49+
#' you use sockets if you can. See [conn_create_unix_socket()].
50+
#'
4551
#' ## Creating the read end of the FIFO
4652
#'
4753
#' This case is simpler. To wait for a writer to connect to the FIFO
@@ -81,6 +87,8 @@ conn_create_fd <- function(fd, encoding = "", close = TRUE) {
8187
#' [poll()], especially on Windows. We might remove this option in the
8288
#' future and make all FIFOs non-blocking.
8389
#'
90+
#' @seealso [processx internals](https://processx.r-lib.org/dev/articles/internals.html)
91+
#'
8492
#' @rdname processx_fifos
8593
#' @export
8694

@@ -488,11 +496,15 @@ is_valid_fd <- function(fd) {
488496

489497
#' Unix domain sockets
490498
#'
499+
#' @description
500+
#' `r lifecycle::badge("experimental")`
501+
#'
491502
#' Cross platform point-to-point inter-process communication with
492503
#' Unix=domain sockets, implemented via named pipes on Windows.
493504
#' These connection are always bidirectional, i.e. you can read from them
494505
#' and also write to them.
495506
#'
507+
#' @details
496508
#' `conn_create_unix_socket()` creates a server socket. The new socket
497509
#' is listening at `filename`. See `filename` above.
498510
#'
@@ -524,6 +536,8 @@ is_valid_fd <- function(fd) {
524536
#' @param con Connection. An error is thrown if not a socket connection.
525537
#' @return A new socket connection.
526538
#'
539+
#' @seealso [processx internals](https://processx.r-lib.org/dev/articles/internals.html)
540+
#'
527541
#' @rdname processx_sockets
528542
#' @export
529543

man/figures/lifecycle-archived.svg

Lines changed: 1 addition & 0 deletions
Loading

man/figures/lifecycle-defunct.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

man/figures/lifecycle-maturing.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

man/figures/lifecycle-stable.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)