mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-12-23 03:59:37 +00:00
storage: remove Clone
off write handle
This commit is contained in:
parent
c886f807dd
commit
4fa37deec5
2 changed files with 4 additions and 5 deletions
|
@ -21,10 +21,9 @@
|
||||||
//!
|
//!
|
||||||
//! The 2nd allows any caller to send [`WriteRequest`][req_w]s.
|
//! The 2nd allows any caller to send [`WriteRequest`][req_w]s.
|
||||||
//!
|
//!
|
||||||
//! The [`BlockchainReadHandle`] can be shared as it is cheaply [`Clone`]able.
|
//! The [`BlockchainReadHandle`] can be shared as it is cheaply [`Clone`]able, however,
|
||||||
//!
|
//! the [`BlockchainWriteHandle`] cannot be cloned. There is only 1 place in Cuprate that
|
||||||
//! Although [`BlockchainWriteHandle`] can also be cloned, there is only 1 place
|
//! writes, so it is passed there and used.
|
||||||
//! in Cuprate that writes (the blockchain manager), so it is passed there and used.
|
|
||||||
//!
|
//!
|
||||||
//! ## Initialization
|
//! ## Initialization
|
||||||
//! The database & thread-pool system can be initialized with [`init()`].
|
//! The database & thread-pool system can be initialized with [`init()`].
|
||||||
|
|
|
@ -21,7 +21,7 @@ const WRITER_THREAD_NAME: &str = concat!(module_path!(), "::DatabaseWriter");
|
||||||
/// Calling [`tower::Service::call`] with a [`DatabaseWriteHandle`]
|
/// Calling [`tower::Service::call`] with a [`DatabaseWriteHandle`]
|
||||||
/// will return an `async`hronous channel that can be `.await`ed upon
|
/// will return an `async`hronous channel that can be `.await`ed upon
|
||||||
/// to receive the corresponding response.
|
/// to receive the corresponding response.
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Debug)]
|
||||||
pub struct DatabaseWriteHandle<Req, Res> {
|
pub struct DatabaseWriteHandle<Req, Res> {
|
||||||
/// Sender channel to the database write thread-pool.
|
/// Sender channel to the database write thread-pool.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue