diff options
| author | Hailey Somerville <[email protected]> | 2023-09-14 13:59:24 +1000 |
|---|---|---|
| committer | Hailey Somerville <[email protected]> | 2023-09-14 13:59:24 +1000 |
| commit | b9d4b18f14ad477c4b554498282ac467ff9cb823 (patch) | |
| tree | f2cbacd15ec0cbc7f6c4e88002774e902a8e343f | |
| parent | 3a1ed823f87d6e823763419245d229a0edb09db8 (diff) | |
update UninitCell::write call in arch::wasm too
| -rw-r--r-- | embassy-executor/src/arch/wasm.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/embassy-executor/src/arch/wasm.rs b/embassy-executor/src/arch/wasm.rs index 934fd69e5..15aed867a 100644 --- a/embassy-executor/src/arch/wasm.rs +++ b/embassy-executor/src/arch/wasm.rs | |||
| @@ -73,9 +73,10 @@ mod thread { | |||
| 73 | pub fn start(&'static mut self, init: impl FnOnce(Spawner)) { | 73 | pub fn start(&'static mut self, init: impl FnOnce(Spawner)) { |
| 74 | unsafe { | 74 | unsafe { |
| 75 | let executor = &self.inner; | 75 | let executor = &self.inner; |
| 76 | self.ctx.closure.write(Closure::new(move |_| { | 76 | let future = Closure::new(move |_| { |
| 77 | executor.poll(); | 77 | executor.poll(); |
| 78 | })); | 78 | }); |
| 79 | self.ctx.closure.write_in_place(|| future); | ||
| 79 | init(self.inner.spawner()); | 80 | init(self.inner.spawner()); |
| 80 | } | 81 | } |
| 81 | } | 82 | } |
