posit-dev / posit-dev/ark

Use `R_isForkedChild` to informatively error in multicore scenarios

Open
#978 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
337
Forks
32
Avg merge
8d 17h
Merged PRs (30d)
11

Description

Ark does not support multicore parallel processing, but we don't have a good way to tell the user this

I recently stumbled across

https://github.com/wch/r-source/blob/69a41188dbe32760d147bb9da6e263e5dbd21071/src/include/Defn.h#L1655

which I think we have access to.

We could check that at every top level repl iteration, and try and log or informatively error if it is ever TRUE, because ark is very much not supported in multicore mode right now (and probably never will be).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the R source Defn.h reference and Ark's top-level REPL iteration. Trace how the kernel handles a forked child and currently reports errors. Done means a multicore or forked-child session is detected with R_isForkedChild and receives an informative unsupported-mode error while normal REPL behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, rust
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.