Skip to content

Commit

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

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 denoland#23592
Towards denoland#24250
Closes denoland#23617
  • Loading branch information
bartlomieju authored and zebreus committed Jul 8, 2024
1 parent 97d9833 commit bcfb07b
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 bcfb07b

Please sign in to comment.