Closed briansmith closed 7 years ago
This ends up happening "for free" whenever we remove uses of the heap, for the most part. Also, in general we've become good at ensuring that std::marker::Send
and std::marker::Sync
are automatically implemented by the compiler automatically, or adding the necessary implementations. If we've missed users of ring should file bugs for the specific missing implementations.
This means using
std::ptr::Unique
for things likeECDHEphemeralKeyPair
. We should probably have some helper inring::ffi
that wraps a pointer withstd::ptr::Unque
, implementsSend
, and also implementsDrop
by calling a one-argument C function to delete the object. That's particularly true becausestd::ptr::Unique
is unstable, so we can't actually use it.See also https://internals.rust-lang.org/t/pre-rfc-raw-pointer-cleanup/2544.