davidchua / pymessenger

A Python Wrapper for the FB Messenger Bot API (Send/Receive API)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pymessenger multi-threading

acondoriml opened this issue · comments

[PYTHON - MESSENGER] Hi! How can I serve multiple clients using multi-threading? Thank you !

Are you asking if this module is thread-safe?

I think @acondoriml is referring to handling multiple connections at once. This might not be possible to do.

@GoelBiju Yes, I want handling multiple connections at once, I try using gunircon, apache, flask, I set up several ways and just handing one connections at once, is a pain. I can´t understand why it doesn´t work

Anyone has solution for this? Hi @acondoriml Did you manage to figure it out?

@davidlowjw I can't find a solution, it's a shame because the library works great!

If you use Flask with Gunicorn, uwgsi and set more than 1 worker you will have the number of workers to reply multiple clients.
If you are using Flask without any upper layer like gunicorn,... you only are going to handle one request per time.