❔ Asynchronously events handling flow
Hi, I am writing a bot and I don't know how to organize events handling with tasks.
I have class that implements these methods:
The actions flow is follow:
StartPolling() listens to a server for events. When the events are received, it should run task that creates kind of threads to handle each event by calling HandleUpdateAsync(GroupUpdate update) and keep listening to the server.
So the question is how to do that?
My version is follow but I guess it blocks current thread until the lambda function is not over because of await word before Task.Run(). When I remove await, Rider warns me to put that word.
the whole code:
1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.