May have race condition
I'm running get_mut and contains_key at same time and it crashed warning
thread 'main' panicked at 'CHashMap
scan failed! No entry found.'
here's some backtrace
thread 'main' panicked at '`CHashMap` scan failed! No entry found.', /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/chashmap-2.2.2/src/lib.rs:246:9
stack backtrace:
thread '<unnamed>' panicked at '`CHashMap` scan_mut failed! No entry found.', /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/chashmap-2.2.2/src/lib.rs:270:9
0: 0x55d3eaffb083 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h6485381528590a55
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: 0x55d3eaff698b - std::sys_common::backtrace::_print::h49a82ae9552e35c7
at src/libstd/sys_common/backtrace.rs:71
2: 0x55d3eaff9d36 - std::panicking::default_hook::{{closure}}::he20974adbefcc046
at src/libstd/sys_common/backtrace.rs:59
at src/libstd/panicking.rs:197
3: 0x55d3eaff9ac9 - std::panicking::default_hook::he4af6af4ac7fef7b
at src/libstd/panicking.rs:211
4: 0x55d3eaffa43f - std::panicking::rust_panic_with_hook::h057ff03eb4c8000f
at src/libstd/panicking.rs:474
5: 0x55d3eaf77e47 - std::panicking::begin_panic::h1520528c0316001e
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libstd/panicking.rs:408
6: 0x55d3ead998fa - chashmap::Table<K,V>::scan::h7ebf45dd7a7b8eab
at /home/clouds/Projects/test/<::std::macros::panic macros>:4
7: 0x55d3ead99a7b - chashmap::Table<K,V>::lookup::h387b6bccf8779723
at /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/chashmap-2.2.2/src/lib.rs:344
8: 0x55d3ead9a6fd - chashmap::CHashMap<K,V>::contains_key::hc7390491d5027d06
at /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/chashmap-2.2.2/src/lib.rs:742
9: 0x55d3ead9a4aa - chashmap::CHashMap<K,V>::insert_new::h1534ec6ef723f81f
at /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/chashmap-2.2.2/src/lib.rs:772
12: 0x55d3eae339fe - test::main::{{closure}}::h697741818c002ad8
at trade/src/main.rs:179
13: 0x55d3eadbf226 - crossbeam_utils::thread::scope::{{closure}}::h556837b14d3cdef4
at /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-utils-0.6.5/src/thread.rs:161
14: 0x55d3eaddb19f - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hc88dde0b2d08071f
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libstd/panic.rs:315
15: 0x55d3eadefd84 - std::panicking::try::do_call::h6b17391b68d20804
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libstd/panicking.rs:293
16: 0x55d3eaffd169 - __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:85
17: 0x55d3eadefb78 - std::panicking::try::hec3cda4721e08fee
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libstd/panicking.rs:272
18: 0x55d3eaddb221 - std::panic::catch_unwind::hea1fcc97098536d8
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libstd/panic.rs:394
19: 0x55d3eadbebee - crossbeam_utils::thread::scope::hbad7e7bd19e60eca
at /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-utils-0.6.5/src/thread.rs:161
20: 0x55d3eae4786f - test::main::hd838a638ee2d5a42
at test/src/main.rs:173
21: 0x55d3eae2866f - std::rt::lang_start::{{closure}}::h672f29521b2597ed
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libstd/rt.rs:64
22: 0x55d3eaff9e42 - std::panicking::try::do_call::hc3d8373a0b215f51
at src/libstd/rt.rs:49
at src/libstd/panicking.rs:293
23: 0x55d3eaffd169 - __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:85
24: 0x55d3eaffaa0c - std::rt::lang_start_internal::he5218c8b95d395f2
at src/libstd/panicking.rs:272
at src/libstd/panic.rs:394
at src/libstd/rt.rs:48
25: 0x55d3eae28648 - std::rt::lang_start::h5d5746182b8a73da
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libstd/rt.rs:64
26: 0x55d3eae47bd9 - main
27: 0x7fae4d426ee2 - __libc_start_main
28: 0x55d3ead7d16d - _start
29: 0x0 - <unknown>
stack backtrace:
0: 0x55d3eaffb083 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h6485381528590a55
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: 0x55d3eaff698b - std::sys_common::backtrace::_print::h49a82ae9552e35c7
at src/libstd/sys_common/backtrace.rs:71
2: 0x55d3eaff9d36 - std::panicking::default_hook::{{closure}}::he20974adbefcc046
at src/libstd/sys_common/backtrace.rs:59
at src/libstd/panicking.rs:197
3: 0x55d3eaff9ac9 - std::panicking::default_hook::he4af6af4ac7fef7b
at src/libstd/panicking.rs:211
4: 0x55d3eaffa43f - std::panicking::rust_panic_with_hook::h057ff03eb4c8000f
at src/libstd/panicking.rs:474
5: 0x55d3eaf77e47 - std::panicking::begin_panic::h1520528c0316001e
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libstd/panicking.rs:408
6: 0x55d3ead99d0a - chashmap::Table<K,V>::scan_mut::h3ee39527562190b8
at /home/clouds/Projects/test/<::std::macros::panic macros>:4
7: 0x55d3ead9862b - chashmap::Table<K,V>::lookup_mut::hffa9a0625e034afd
at /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/chashmap-2.2.2/src/lib.rs:365
8: 0x55d3ead9b0af - chashmap::CHashMap<K,V>::get_mut::{{closure}}::haf8c62ff3ba35133
at /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/chashmap-2.2.2/src/lib.rs:716
9: 0x55d3eadd833f - owning_ref::OwningHandle<O,H>::new_with_fn::hda28a60b929e5513
at /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/owning_ref-0.3.3/src/lib.rs:832
10: 0x55d3ead9aed0 - chashmap::CHashMap<K,V>::get_mut::h8696c2733f298f57
at /home/clouds/.cargo/registry/src/github.com-1ecc6299db9ec823/chashmap-2.2.2/src/lib.rs:714
11: 0x55d3eae4786f - test::main::hd838a638ee2d5a42
at test/src/main.rs:206