Closed ibraheemdev closed 2 years ago
HashMap::clear does not have K\V: Send + Sync bounds, even though it calls defer_destroy on nodes and values, which might call the destructors on another thread. Unless I am missing something, this is unsound and could cause undefined behavior.
HashMap::clear
K\V: Send + Sync
defer_destroy
Ah, yes, you are entirely right! Good catch. Would you mind submitting a PR with a fix?
Fixed as a side-affect of #102, K/V: 'static is no longer required.
HashMap::clear
does not haveK\V: Send + Sync
bounds, even though it callsdefer_destroy
on nodes and values, which might call the destructors on another thread. Unless I am missing something, this is unsound and could cause undefined behavior.