Skip to content

Commit

Permalink
refactor(jupyter): move ZeroMQ server to a separate thread (#24373)
Browse files Browse the repository at this point in the history
Moves the ZeroMQ messaging server to a separate thread.

This will allow to run blocking JS code and maintain communication
with the notebook frontend.

Towards #23592
Towards #24250
Closes #23617
  • Loading branch information
bartlomieju committed Jul 2, 2024
1 parent c13b6d1 commit 7d919f6
Show file tree
Hide file tree
Showing 4 changed files with 484 additions and 151 deletions.
4 changes: 2 additions & 2 deletions cli/ops/jupyter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 45,11 @@ pub async fn op_jupyter_broadcast(

(
s.borrow::<Arc<Mutex<KernelIoPubConnection>>>().clone(),
s.borrow::<Rc<RefCell<Option<JupyterMessage>>>>().clone(),
s.borrow::<Arc<Mutex<Option<JupyterMessage>>>>().clone(),
)
};

let maybe_last_request = last_execution_request.borrow().clone();
let maybe_last_request = last_execution_request.lock().await.clone();
if let Some(last_request) = maybe_last_request {
let content = JupyterMessageContent::from_type_and_content(
&message_type,
Expand Down
Loading

0 comments on commit 7d919f6

Please sign in to comment.