Skip to content

Commit

Permalink
Move r_task() initialization after R was set up
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Oct 4, 2024
1 parent 191c964 commit e86027b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/ark/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,6 @@ impl RMain {
let (tasks_interrupt_tx, tasks_interrupt_rx) = unbounded::<RTask>();
let (tasks_idle_tx, tasks_idle_rx) = unbounded::<RTask>();

r_task::initialize(tasks_interrupt_tx.clone(), tasks_idle_tx.clone());

unsafe {
R_MAIN = Some(RMain::new(
kernel_mutex,
Expand Down Expand Up @@ -416,6 +414,9 @@ impl RMain {
// Set up the global error handler (after support function initialization)
errors::initialize();

// Now allow interrupt-time tasks to run
r_task::initialize(tasks_interrupt_tx.clone(), tasks_idle_tx.clone());

// Now that R has started (emitting any startup messages), and now that we have set
// up all hooks and handlers, officially finish the R initialization process to
// unblock the kernel-info request and also allow the LSP to start.
Expand Down

0 comments on commit e86027b

Please sign in to comment.