Skip to main content

with_read_pub

Function with_read_pub 

Source
pub async fn with_read_pub<T, F>(
    state: &Arc<Homeserver>,
    work: F,
) -> Result<T, MatrixError>
where T: Send + 'static, F: FnOnce(&Connection) -> Result<T, MatrixError> + Send + 'static,
Expand description

Read-only work on a pooled reader connection (the store’s parallel WAL readers); falls back to the writer when no read pool is attached (in-memory stores). work must not write.