Change the RoTxn
to support both WithTls
and WithoutTls
#290
Labels
Milestone
RoTxn
to support both WithTls
and WithoutTls
#290
Currently, all
RoTxn
created structs areSend
if theread-txn-no-tls
crate feature is set. This is not ideal because TLS-basedRoTxn
are less expensive and could be enabled by a dependency also depending on heed.The best way to disable TLS would be to create two new unit structs: the
WithTls
andWithoutTls
. TheRoTxn
would be parametric on it and become:RoTxn<WithoutTls>
which makes itSend
. We define this parameter when constructing it.Unfortunately, the
Env::read_txn
method cannot use the defaultWithoutTls
parameter as there are no default generics on methods in Rust, yet...The text was updated successfully, but these errors were encountered: