Remove usage of `r_task()`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 337
- Forks
- 32
- Avg merge
- 8d 17h
- Merged PRs (30d)
- 11
Description
Currently there are many places where we evaluate R code / access the R API through the use of r_task(), which hooks into R's polled events. This makes it easy to implement analytic features but has a number of downsides:
-
The R event polls might be slowed down of stuck if native code running in the R session doesn't check for interrupts sufficiently often.
-
While R polls at specific times such as checks for interrupts, in practice we should consider polled events to be preemptive. This is unsafe because we might accidentally call a non-rentrant function, for instance we might force a promise that causes a
loadNamespace(), which is not reentrant, while it is already running. It is difficult to manage these risks as the project grows and many features are added, querying R all the time.
So we should strive to reduce concurrent evaluations to the bare minimum:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files or tests; start by locating the usages and implementation of r_task() in the ark repository, then review linked issues #689, #2321, and #1095 for scope. Done means the remaining concurrent R evaluations are reduced to the intended minimum and the referenced work items are addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, rust
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100