diff options
| author | Dániel Buga <[email protected]> | 2024-11-19 15:59:31 +0100 |
|---|---|---|
| committer | Dániel Buga <[email protected]> | 2024-11-19 16:25:17 +0100 |
| commit | 8ebe059ecb311ee949f92dde33f2cb8d972b0f7b (patch) | |
| tree | 4906d12e2a2f141dded4defd84650b165e2da51d /embassy-executor/src/arch/wasm.rs | |
| parent | ff02ee1a221122ede6e30a94156c42e22b400578 (diff) | |
Add initialize
Diffstat (limited to 'embassy-executor/src/arch/wasm.rs')
| -rw-r--r-- | embassy-executor/src/arch/wasm.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/embassy-executor/src/arch/wasm.rs b/embassy-executor/src/arch/wasm.rs index f9d0f935c..35025f11f 100644 --- a/embassy-executor/src/arch/wasm.rs +++ b/embassy-executor/src/arch/wasm.rs | |||
| @@ -71,6 +71,10 @@ mod thread { | |||
| 71 | /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe) | 71 | /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe) |
| 72 | pub fn start(&'static mut self, init: impl FnOnce(Spawner)) { | 72 | pub fn start(&'static mut self, init: impl FnOnce(Spawner)) { |
| 73 | unsafe { | 73 | unsafe { |
| 74 | self.inner.initialize(); | ||
| 75 | } | ||
| 76 | |||
| 77 | unsafe { | ||
| 74 | let executor = &self.inner; | 78 | let executor = &self.inner; |
| 75 | let future = Closure::new(move |_| { | 79 | let future = Closure::new(move |_| { |
| 76 | executor.poll(); | 80 | executor.poll(); |
