Skip to main content

read_address_book

Function read_address_book 

Source
async fn read_address_book<AddressBook, T>(
    address_book: &AddressBook,
    read: impl FnOnce(AddressBook) -> T + Send + 'static,
) -> RpcResult<T>
where AddressBook: AddressBookPeers + Clone + Send + Sync + 'static, T: Send + 'static,
Expand description

Runs read against the address book on a blocking thread, so waiting on its mutex doesn’t park an async runtime worker (#11618).