Possible deadlock in telebot-core.telebot_core_curl_perform()
Closed this issue · 3 comments
Nik4053 commented
The method sets core_h->busy = true, but never sets it back to false on error.
-> Next time program will halt indefinitely.
smartnode commented
Indeed, there is a bug that may cause deadlock. Following patch fixes it.
e4adb71
Nik4053 commented
I am new to this kind of thing but why can we use just a normal variable as a lock?
I thought a mutex or an atomic operation has to be used in such cases.
smartnode commented
I was using simpler alternative to mutex, and remove necessity for locking, and/or busy waiting.