Bolt uses Gevent to allow for highly concurrent functioning.
At a high level, Bolt creates threads for everything it does. There will be green threads for:
Webhook HTTP Server
Gevent will patch parts of the standard library on functions that would normally block IO, however it's still possible to block by using
time.sleep(). If you need to introduce a delay, use
Gevent does NOT patch file IO. Usually this is already so fast there's not a lot of benefit to it. This is part of the reason Bolt uses MongoDB for it's database, since that will be handled via a socket.