Move the event loop to evtloop.c, and wake up sleeping jobs every 10 seconds.
[apps/madmutt.git] / main.c
diff --git a/main.c b/main.c
index 74f95be..af2141e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -176,14 +176,6 @@ static void mutt_nocurses_error (const char *fmt, ...)
     fputc('\n', stderr);
 }
 
-static void *evtloop(void *data)
-{
-    for (;;) {
-        el_dispatch(100);
-        pthread_testcancel();
-    }
-}
-
 int main (int argc, char **argv)
 {
   char folder[_POSIX_PATH_MAX] = "";
@@ -317,7 +309,7 @@ int main (int argc, char **argv)
   el_initialize();
   mutt_init (flags & M_NOSYSRC, commands);
   string_list_wipe(&commands);
-  pthread_create(&pt, NULL, &evtloop, NULL);
+  pthread_create(&pt, NULL, &el_loop, NULL);
 
   if (!option(OPTNOCURSES)) {
       ui_layout_init();