summaryrefslogtreecommitdiff
path: root/alot/__main__.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-10-04 09:09:16 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-10-04 09:15:58 -0700
commite96adc4bafd72aee7380020a6e1f92a055358d86 (patch)
tree97fb7b36ae2088ae36cd1d1c474c5de94d6232c2 /alot/__main__.py
parent52f92e891a09796ef4212ed355e8ce0faede9d79 (diff)
Go back to Twisted event loop
Urwid + asyncio has been known to have very high CPU usage for 4 years now, and it hasn't been fixed. That basically makes it impossible to switch event loops. We can still get the asyncio syntax goodness but using the twisted asyncioreactor and then initializing urwid with the Twisted loop which doesn't have this problem. Fixes #1302
Diffstat (limited to 'alot/__main__.py')
-rw-r--r--alot/__main__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/alot/__main__.py b/alot/__main__.py
index 221e6b22..c901bb07 100644
--- a/alot/__main__.py
+++ b/alot/__main__.py
@@ -16,6 +16,9 @@ from alot.commands import *
from alot.commands import CommandParseError, COMMANDS
from alot.utils import argparse as cargparse
+from twisted.internet import asyncioreactor
+asyncioreactor.install()
+
_SUBCOMMANDS = ['search', 'compose', 'bufferlist', 'taglist', 'namedqueries',
'pyshell']