scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 395 forks source link

PROPOSAL: Use python async module #65

Closed merqurio closed 8 years ago

merqurio commented 8 years ago

Using new python async module could be beneficial in a case like slackbot.

The MessageDispatcher.loop could be an @asyncio.coroutine and the main Bot.run simply a loop.run_until_complete.

Understanding that concurrency is about dealing with lots of things at same time and parallelism about doing lots of things at once, I think async coroutines are a good choice in this case.

Pros:

Cons:

I would love to hear your opinions on this.

aperezalbela commented 7 years ago

@merqurio Why did you closed this? I totally agree, but...

To avoid Python 3.4+ only disadvantage, it could be done using Twisted (event-driven).

merqurio commented 7 years ago

Sorry, We don't use slack any more. Bests