From 5b349129d055e6f0e4f9fae3a414e3f00fccf9e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20NOEL?= Date: Wed, 11 Dec 2024 14:33:29 +0100 Subject: [PATCH] fix e/Offload --- src/hyperfiddle/electric3.cljc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/hyperfiddle/electric3.cljc b/src/hyperfiddle/electric3.cljc index f4b67c9b..9eb9aaca 100644 --- a/src/hyperfiddle/electric3.cljc +++ b/src/hyperfiddle/electric3.cljc @@ -473,15 +473,9 @@ inhibit undesired duplicate effects with code like (if x a a) or (or a1 a2)." ([t] (join (task->incseq t))) ([t init-v] (input (initialized t init-v))))) -#?(:clj (cc/defn -offload [tsk executor] - (flow->incseq (m/ap (try (m/? (m/via-call executor (m/?< (mx/poll-task tsk)))) - (catch Cancelled _ (m/amb))))))) - - (hyperfiddle.electric3/defn Offload - ([f!] ($ Offload f! m/blk)) - ([f! executor] (server (let [mbx (m/mbx)] (mbx f!) (join (-offload mbx executor)))))) - + ([f!] (server (f!))) + ([f! _] (server (f!)))) (hyperfiddle.electric3/declare ^{:doc "Bound to the HTTP request of the page in which the current Electric program is running."} http-request)