github rbatis/rbatis v1.7.0

latest releases: v4.5.22, v4.5.21, v4.5.20...
3 years ago

v1.7.0

  • use new of SyncMap(based on Tokio/AsyncStd's RWLock+std::HashMap)
    Older versions of dashmap block the runtime when a transaction starts,so we use new of SyncMap replace it!
    ‘SyncMap’ Ensure that when a transaction is running, simultaneous access to the transaction will only block the currently running coprocessor

this is impl rust code detail

#[cfg(feature = "runtime-async-std")]
pub(crate) use async_std::{
    sync::RwLock,
    sync::RwLockReadGuard,
    sync::RwLockWriteGuard
};

#[cfg(feature = "runtime-tokio")]
pub(crate) use tokio::{
    sync::RwLock,
    sync::RwLockReadGuard,
    sync::RwLockWriteGuard
};

use crate::runtime::{RwLock, RwLockReadGuard, RwLockWriteGuard};
pub struct SyncMap<K, V> where K: Eq + Hash {
    pub shard: RwLock<HashMap<K, V, RandomState>>,
}
  • PagePlugin will be remove order by sql

Don't miss a new rbatis release

NewReleases is sending notifications on new releases.