MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / run_outside_async_runtime

Function run_outside_async_runtime

atomic-cli/src/commands/agent/owner.rs:853–861  ·  view source on GitHub ↗
(operation: F)

Source from the content-addressed store, hash-verified

851}
852
853fn run_outside_async_runtime<T, F>(operation: F) -> anyhow::Result<T>
854where
855 T: Send + 'static,
856 F: FnOnce() -> anyhow::Result<T> + Send + 'static,
857{
858 std::thread::spawn(operation)
859 .join()
860 .map_err(|_| anyhow!("database owner client thread panicked"))?
861}
862
863/// Send one request to an already-running owner.
864fn request(repository: &Path, request_body: OwnerRequest) -> anyhow::Result<OwnerResponse> {

Callers 7

reserve_turnMethod · 0.85
appendMethod · 0.85
prepare_checkpointMethod · 0.85
load_frozen_envelopesMethod · 0.85
bind_checkpoint_hashMethod · 0.85
request_turn_lifecycleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected