• yiwu-arbug's avatar
    implemented !Send for PerfContext struct (#442) · 9abbf010
    yiwu-arbug authored
    fix tikv/tikv#6973
    
    As mentioned in the linked issue, the aim is to implement `!Send` for the `PerfContext` struct.
    Although the issue is related to the `tikv/tikv` repo, the concerned `PerfContext` is taken from this repo. 
    Due to the rule that "foreign traits can't be implemented on foreign types", it isn't possible to directly implement the `!Send` trait on the `PerfContext` struct. So, either I had to enclose the `PerfContext` within another type and implement `!Send` for the new type (along with implementing all the functions present for `PerfContext`), or directly add the `!Send` implementation, where the struct is defined, i.e, in this repo.  I've taken the second path.
    but, there is a problem. `impl !Send` is currently only supported in nightly and not on stable channel.
    So, it's necessary to build this crate with nightly toolchain, if this patch is accepted.
    Signed-off-by: 's avatarGovardhan G D <govardhangdg@gmail.com>
    9abbf010
Name
Last commit
Last update
benches Loading commit data...
librocksdb_sys Loading commit data...
scripts Loading commit data...
src Loading commit data...
tests Loading commit data...
travis-build Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.travis.yml Loading commit data...
Cargo.toml Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
rustfmt.toml Loading commit data...