gobject.MainLoop and tornado.IOLoop at once?
Question: How can you run two event loops in one application?

I need to use
[tornado.IOLoop](http://www.tornadoweb.org/en/stable/ioloop.html#ioloop-
objects) (WebSocket client) and
[gobject.MainLoop](http://www.pygtk.org/pygtk2reference/class-
gobjectmainloop.html) (pygtk) in one Python program.

**Update:** Threadless solutions are preferred.


Answer: You could use a thread

    
    
    import threading
    threading.Thread(target=my_ioloop.start).start()
    

