diff --git a/Cargo.lock b/Cargo.lock index 381bb0dddd45d862afe4c4bdce4b07d36c5f86d7..d234519ec0042fef84e44a6f821c765fe5a0f537 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8917,9 +8917,9 @@ dependencies = [ [[package]] name = "runtimelib" -version = "0.12.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a4a788465cf51b7ac8f36e4e4ca3dd26013dcddd5ba8376f98752278244294" +checksum = "0c3d817764e3971867351e6103955b17d808f5330e9ef63aaaaab55bf8c664c1" dependencies = [ "anyhow", "async-dispatcher", diff --git a/Cargo.toml b/Cargo.toml index ef2488db086fdabc4beac7ca26c7b1d88593fced..3dcbe600d8568987fcd39108d7b72565ec002d06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -362,7 +362,7 @@ refineable = { path = "./crates/refineable" } regex = "1.5" repair_json = "0.1.0" rsa = "0.9.6" -runtimelib = { version = "0.12", default-features = false, features = [ +runtimelib = { version = "0.14", default-features = false, features = [ "async-dispatcher-runtime", ] } rusqlite = { version = "0.29.0", features = ["blob", "array", "modern_sqlite"] } diff --git a/crates/repl/src/kernels.rs b/crates/repl/src/kernels.rs index 2785bcf933a0a548a74ae45908d7f27318262a61..359d16fcab1b13a652e9064661ec1eebfcfc9702 100644 --- a/crates/repl/src/kernels.rs +++ b/crates/repl/src/kernels.rs @@ -19,6 +19,7 @@ use std::{ path::PathBuf, sync::Arc, }; +use uuid::Uuid; #[derive(Debug, Clone)] pub struct KernelSpecification { @@ -228,9 +229,17 @@ impl RunningKernel { .spawn() .context("failed to start the kernel process")?; - let mut iopub_socket = connection_info.create_client_iopub_connection("").await?; - let mut shell_socket = connection_info.create_client_shell_connection().await?; - let mut control_socket = connection_info.create_client_control_connection().await?; + let session_id = Uuid::new_v4().to_string(); + + let mut iopub_socket = connection_info + .create_client_iopub_connection("", &session_id) + .await?; + let mut shell_socket = connection_info + .create_client_shell_connection(&session_id) + .await?; + let mut control_socket = connection_info + .create_client_control_connection(&session_id) + .await?; let (mut iopub, iosub) = futures::channel::mpsc::channel(100); diff --git a/crates/repl/src/session.rs b/crates/repl/src/session.rs index d5fa2cfc9d91917af8bb7751459e35fdaf2749d9..4803b093d96803f50325a4f179a34c89d790a0d0 100644 --- a/crates/repl/src/session.rs +++ b/crates/repl/src/session.rs @@ -334,6 +334,18 @@ impl Session { .ok(); } }); + + // todo!(kyle): send kernelinforequest once our shell channel read/writes are split + // cx.spawn(|this, mut cx| async move { + // cx.background_executor() + // .timer(Duration::from_millis(120)) + // .await; + // this.update(&mut cx, |this, cx| { + // this.send(KernelInfoRequest {}.into(), cx).ok(); + // }) + // .ok(); + // }) + // .detach(); }) .ok(); }