Hi,
I noticed that to run multiple things at once embassy_futures::join is being used, I have a similar use case where I have replaced it with FuturesUnordered from futures-rs and this avoids polling every future every time, kind of like if they were separate tasks(I did this after noticing that all of my futures were being pulled like 1000 times per second).
It uses an Arc backed linked list, but allocations are made only when setting up the futures, not while running them. I have a fork of futures-rs in my profile that optionally uses portable-atomic and portable-atomic-util types, so archs without atomics are not a problem.
I know it is a bit experimental, but I wanted to know if you would like to give it a try, right now I don't have hardware to test on, but if you do want to try it I'll modify an example for you to test it.
Hi,
I noticed that to run multiple things at once
embassy_futures::joinis being used, I have a similar use case where I have replaced it withFuturesUnorderedfromfutures-rsand this avoids polling every future every time, kind of like if they were separate tasks(I did this after noticing that all of my futures were being pulled like 1000 times per second).It uses an
Arcbacked linked list, but allocations are made only when setting up the futures, not while running them. I have a fork offutures-rsin my profile that optionally usesportable-atomicandportable-atomic-utiltypes, so archs without atomics are not a problem.I know it is a bit experimental, but I wanted to know if you would like to give it a try, right now I don't have hardware to test on, but if you do want to try it I'll modify an example for you to test it.