Pajn / iterates

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Why is throttle dropping items #33

Open kuchta opened 5 years ago

kuchta commented 5 years ago

This behaviour makes sense in push based systems (Observables and other push-based streams) but I don't get why this is applied to pull based systems like Async Iterators.

Could you explain?

Pajn commented 5 years ago

I have used throttle very similar to how you would use throttle with Observables. Basically a lot of my personal use case for the async variants are as a light weight observable replacement, with the added bonus of great integration with language level features.

However a non dropping variant that only calls next when needed (the consumer has called next and the required time has passed) sounds like something that could be useful as well.

Is this something you would be interested in working on? I can't promise that I have the time myself to implement this soonish.

kuchta commented 5 years ago

Thank you @Pajn for explanation. I thought this would be the case. Unfortunatelly I don't have time at the moment to implement this, so I switched to iter-tools from @sithmel which have all functionality I need now.