Skip to content

Commit 6486bf3

Browse files
committed
More documentation
1 parent 2f7ff1f commit 6486bf3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

crates/ark/src/interface.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,9 @@ impl RMain {
805805
let tasks_interrupt_rx = self.tasks_interrupt_rx.clone();
806806
let tasks_idle_rx = self.tasks_idle_rx.clone();
807807

808-
// Process R's polled events regularly while waiting for console input
808+
// Process R's polled events regularly while waiting for console input.
809+
// We used to poll every 200ms but that lead to visible delays for the
810+
// processing of plot events.
809811
let polled_events_rx = crossbeam::channel::tick(Duration::from_millis(50));
810812

811813
let r_request_index = select.recv(&r_request_rx);
@@ -1881,7 +1883,11 @@ impl RMain {
18811883
// https://github.com/rstudio/positron/issues/431
18821884
unsafe { R_RunPendingFinalizers() };
18831885

1884-
// Check for Positron render requests
1886+
// Check for Positron render requests.
1887+
//
1888+
// TODO: This should move to a spawned task that'd be woken up by
1889+
// incoming messages on plot comms. This way we'll prevent the delays
1890+
// introduced by timeout-based event polling.
18851891
graphics_device::on_process_idle_events();
18861892
}
18871893

0 commit comments

Comments
 (0)