Skip to content

Commit

Permalink
Fixed Send/Sync in CompiledModule
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed May 5, 2020
1 parent 0de4a22 commit 60e8350
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions lib/engine-jit/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,6 @@ impl CompiledModule {
}
}

unsafe impl Sync for CompiledModule {}
unsafe impl Send for CompiledModule {}

impl BaseCompiledModule for CompiledModule {
unsafe fn finish_instantiation(
&self,
Expand Down
6 changes: 3 additions & 3 deletions lib/engine/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::sync::Arc;
use wasmer_runtime::InstanceHandle;
use wasmer_runtime::Module;

use downcast_rs::{impl_downcast, DowncastSync};
use downcast_rs::{impl_downcast, Downcast};

/// The `CompiledModule` trait is used by engine implementors, such
/// as a JIT or Native execution.
pub trait CompiledModule: DowncastSync {
pub trait CompiledModule: Downcast {
/// Finish instantiation of a `InstanceHandle`
///
/// # Unsafety
Expand All @@ -25,4 +25,4 @@ pub trait CompiledModule: DowncastSync {
fn module_mut(&mut self) -> &mut Module;
}

impl_downcast!(sync CompiledModule); // `sync` => also produce `Arc` downcasts.
impl_downcast!(CompiledModule); // `sync` => also produce `Arc` downcasts.

0 comments on commit 60e8350

Please sign in to comment.