fix(napi): impl Send Sync to External

This commit is contained in:
LongYinan 2023-02-08 17:33:27 +08:00
parent efacce7f66
commit c34ccc9131
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7

View file

@ -12,6 +12,9 @@ pub struct External<T: 'static> {
pub adjusted_size: i64,
}
unsafe impl<T: 'static + Send> Send for External<T> {}
unsafe impl<T: 'static + Sync> Sync for External<T> {}
impl<T: 'static> TypeName for External<T> {
fn type_name() -> &'static str {
"External"