-
Notifications
You must be signed in to change notification settings - Fork 4
Stdweb spawn local future #38
Stdweb spawn local future #38
Conversation
Allow to execute futures from Agents aswell as from Components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to do this!
My only reservation I have about this is discarding web-sys implementation entirely.
There are future plans in Yew to support parallel implementations that rely on either web-sys or stdweb, so the old web-sys based futures support may come in handy later.
Since I can't come up with a scheme that makes feature-gating either stdweb or web-sys support practical right now, I'll resurrect the old implementation myself when it comes time to do so.
Just remove the unneeded dependencies from the cargo.toml and I think that this is good to merge when Yew merges the associated PR there.
Update, apparently this feature required that |
A damn, I wasn't sure it was needed, sorry about that |
No problem |
send_self
send_self_batch
tosend_message
send_message_batch
Futures successfully executed and sent back message to the Component/Agent using
cargo web
and asmjs target.Also tested with wasm32-unknown-unknown target and it work great
Issue: yewstack/yew#776
It depends on yewstack/yew#802 for
AgentLinkFuture
to work