Skip to content

Commit 49396f8

Browse files
committed
More documentation
1 parent 5350cf1 commit 49396f8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

crates/ark/src/interface.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,9 @@ impl RMain {
776776
let tasks_interrupt_rx = self.tasks_interrupt_rx.clone();
777777
let tasks_idle_rx = self.tasks_idle_rx.clone();
778778

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

782784
let r_request_index = select.recv(&r_request_rx);
@@ -1841,7 +1843,11 @@ impl RMain {
18411843
// https://github.com/rstudio/positron/issues/431
18421844
unsafe { R_RunPendingFinalizers() };
18431845

1844-
// Check for Positron render requests
1846+
// Check for Positron render requests.
1847+
//
1848+
// TODO: This should move to a spawned task that'd be woken up by
1849+
// incoming messages on plot comms. This way we'll prevent the delays
1850+
// introduced by timeout-based event polling.
18451851
graphics_device::on_process_idle_events();
18461852
}
18471853

0 commit comments

Comments
 (0)