Browse Source

clear the thread pool on quit

master
Julio Biason 15 years ago
parent
commit
e58d36f8bf
  1. 8
      issues/issue-3b259da1d5ba1894c81778cba79d1e450f8ed2a9.yaml
  2. 9
      mitterlib/ui/ui_pygtk.py

8
issues/issue-3b259da1d5ba1894c81778cba79d1e450f8ed2a9.yaml

@ -5,8 +5,8 @@ type: :bugfix
component: pygtk
release: 1.0.0
reporter: Julio Biason <julio.biason@gmail.com>
status: :unstarted
disposition:
status: :closed
disposition: :fixed
creation_time: 2009-12-16 14:19:30.288852 Z
references: []
@ -16,3 +16,7 @@ log_events:
- Julio Biason <julio.biason@gmail.com>
- created
- kill the threads
- - 2009-12-28 11:15:15.790074 Z
- Julio Biason <julio.biason@gmail.com>
- closed with disposition fixed
- at least, I think so.

9
mitterlib/ui/ui_pygtk.py

@ -32,7 +32,6 @@ import webbrowser
from cgi import escape as html_escape
from mitterlib.ui.helpers.image_helpers import find_image
from mitterlib import htmlize
from mitterlib.constants import gpl_3, version
from mitterlib.ui.helpers import timesince
@ -194,6 +193,13 @@ class _ThreadManager(object):
self._thread_id += 1
return
def clear(self):
"""Clear the thread pool list. This will cause the manager to stop
working after the threads finish."""
self._thread_pool = []
self._running = []
return
# ----------------------------------------------------------------------
# Mitter interface object
@ -824,6 +830,7 @@ class Interface(object):
self._options[self.NAMESPACE]['height'] = height
# TODO: Kill any threads running.
self._threads.clear()
gtk.main_quit()
return

Loading…
Cancel
Save