matplotlib/matplotlib — pull request #2865 by vmarkovtsev (2014-03-05 06:50:27+00:00)
Title: WebAgg: raise WebAggApplication.started flag before blocking

Since Tornado's IOLoop start() blocks until the loop is closed,
cls.started is set to True *after* an application actually
stops working.
Revert running() check since it no longer exists in newer versions
of Tornado and will never return back.