mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-17 22:06:27 +00:00
Do not make Core a thread anymore as it is not needed.
This commit is contained in:
parent
f042bf0dda
commit
76a0eb12e8
@ -90,12 +90,11 @@ DEFAULT_PREFS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Core(
|
class Core(
|
||||||
threading.Thread,
|
|
||||||
ThreadingMixIn,
|
ThreadingMixIn,
|
||||||
SimpleXMLRPCServer.SimpleXMLRPCServer):
|
SimpleXMLRPCServer.SimpleXMLRPCServer):
|
||||||
def __init__(self, port):
|
def __init__(self, port):
|
||||||
log.debug("Core init..")
|
log.debug("Core init..")
|
||||||
threading.Thread.__init__(self)
|
#threading.Thread.__init__(self)
|
||||||
|
|
||||||
self.client_address = None
|
self.client_address = None
|
||||||
|
|
||||||
@ -141,6 +140,7 @@ class Core(
|
|||||||
gettext.install("deluge",
|
gettext.install("deluge",
|
||||||
pkg_resources.resource_filename(
|
pkg_resources.resource_filename(
|
||||||
"deluge", "i18n"))
|
"deluge", "i18n"))
|
||||||
|
# Setup signals
|
||||||
try:
|
try:
|
||||||
import gnome.ui
|
import gnome.ui
|
||||||
self.client = gnome.ui.Client()
|
self.client = gnome.ui.Client()
|
||||||
@ -250,7 +250,7 @@ class Core(
|
|||||||
self.loop = gobject.MainLoop()
|
self.loop = gobject.MainLoop()
|
||||||
self.loop.run()
|
self.loop.run()
|
||||||
|
|
||||||
def _shutdown(self):
|
def _shutdown(self, data=None):
|
||||||
"""This is called by a thread from shutdown()"""
|
"""This is called by a thread from shutdown()"""
|
||||||
log.info("Shutting down core..")
|
log.info("Shutting down core..")
|
||||||
component.shutdown()
|
component.shutdown()
|
||||||
|
@ -37,7 +37,5 @@ from deluge.log import LOG as log
|
|||||||
class Daemon:
|
class Daemon:
|
||||||
def __init__(self, port):
|
def __init__(self, port):
|
||||||
# Start the core as a thread and join it until it's done
|
# Start the core as a thread and join it until it's done
|
||||||
self.core = Core(port)
|
self.core = Core(port).run()
|
||||||
self.core.start()
|
|
||||||
self.core.join()
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user