mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
docs(jsonrpc): Notification handlers must not wait for the remote side
Claude-Session: https://claude.ai/code/session_01VUYsdXA2nkF5v6zsC93dpn
This commit is contained in:
@@ -203,7 +203,9 @@ pub mod codes {
|
||||
/// Calls run on blocking-capable threads, never on the reader task, so a slow
|
||||
/// handler cannot stall response delivery. Notifications are delivered one at
|
||||
/// a time in arrival order; requests run concurrently, each once every
|
||||
/// notification that arrived before it has been handled.
|
||||
/// notification that arrived before it has been handled. So `on_notification`
|
||||
/// must not wait for the remote side (a response to our request may depend on
|
||||
/// its request to us, which would then never start); hand such work to a task.
|
||||
pub trait Handler: Send + Sync + 'static {
|
||||
fn on_notification(&self, method: &str, params: Value);
|
||||
/// Respond to a server→client request (e.g. `workspace/configuration`).
|
||||
|
||||
Reference in New Issue
Block a user