Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion core/connectors/sdk/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,15 @@ async fn handle_messages<T: Source>(
}
};

callback(plugin_id, messages.as_ptr(), messages.len());
// The callback can block for backpressure (the runtime parks
// it while its bounded forwarding channel is full), and this
// task runs on the runtime shared by every instance loaded
// from this library. Hand the worker off so a saturated
// instance cannot pin it and stall a sibling's close, which
// waits on this task exiting.
tokio::task::block_in_place(|| {
callback(plugin_id, messages.as_ptr(), messages.len());
});
}
}
}
Expand Down
Loading