ba0f3 / telebot.nim

Async Telegram Bot API Client implement in @Nim-Lang
MIT License
165 stars 24 forks source link

Restore async concurrency #31

Closed zedeus closed 5 years ago

zedeus commented 5 years ago

Thank you for the recent updates, good to see some progress. From 22ba9b9 and onwards though, my bots broke. After some changes to my code it started working again, but I noticed all updates were blocking, for example by calling await sleepAsync(1000) in a callback blocks other updates.

I found out this is due to using a single AsyncHttpClient, which to my knowledge cannot actually handle multiple requests asynchronously. I rolled back that change and made some modifications to support your new proxy changes.

This is still a bit slower than using the same http client at all times but I can't see any way to do that concurrently. Let me know what you think.

ba0f3 commented 5 years ago

Actually I didn't use this lib much, therefor I didnt notice the blocking. I'm really sorry about this, next time I will make them as experimential for testing first. I will merge the PR, can you do a version bump too? Thank you vey much!

zedeus commented 5 years ago

Done, thank you :)

ba0f3 commented 5 years ago

I cant make new release w/ FastHub for Android yet, I will make it when I reach the computer :smile: