Closed dixel closed 6 years ago
@Otann what about to add in Readme prefer way to work with updates?
or maybe have a channel returned directly if no "handler" function is passed
that is a very fine addition to the API design, thank you
@Chiliec I suppose it depends on the complexity of the application a lot, whether it should be sync or async, channels or manifolds, polling or not.
But this is something that could I could do for the template for sure.
@Otann I think most people want to copy-paste code and use polling for rapidly start new bot, but suspension taking requests after some normal working time — totally impermissible 😕
@dixel how about if a handler is a channel, you get updates there? this sounds like a decent interface and easily doable: f0708f0
@Otann yes, this interface is actually perfect for some of the scenarios that I have, I suppose this can be closed then when you're ready to give it a go.
released as 0.4.0
.. or maybe have a channel returned directly if no "handler" function is passed. From the perspective of an application relying on core.async and using morse, the most feasible thing to do in the "handler" function is to push the data to another channel in your application which in the current situation is a bit redundant since the "updates" channel in polling is already serving that purpose. From the other hand I can understand that it's the matter of taste what is a better interface for the library - to provide the way to pass a callback handler (which can be more universal since not everybody use core.async in their applications) or a channel. Anyway, I'd be happy to have this ability.