Commit Graph

6 Commits

Author SHA1 Message Date
Dmitri Bogomolov 7a89109fc9
New logging approach in order to reduce imports from submodules
and use logging without risk of circular import. Only subpackage
that imports from debug is bitmessageqt - because it also uses
debug.resetLogging().
Instead of from debug import logger is now recommended to use:

import logging

logger = logging.getLogger('default')

All subclasses of StoppableThread now have a logger attribute.
All threading related stuff except for set_thread_name()
was moved from helper_threading to network.threads.

Fixed two my mistakes from previous edit of debug in a1a8d3a:

 - logger.handlers is not dict but iterable
 - sys.excepthook should be set unconditionally
2019-10-18 09:35:24 +03:00
Dmitri Bogomolov ad2a2b3fb4
Inherit helper_threading.StoppableThread from threading.Thread
and do random.seed() in its __init__
2019-08-06 18:07:19 +03:00
Peter Šurda a090eea9b0
Minor multiqueue updates
- add task_done to addrthread and invthread
- implement totalSize for multiqueue
- order in invThread changed
2017-10-19 08:56:48 +02:00
Peter Šurda f088e0ae21
Change thread names
- not needed to have "Thread" in the name of a thread
2017-07-10 07:05:50 +02:00
Peter Šurda 4fce01e34a
Less data transferred in invThread and addrThread 2017-07-08 18:02:47 +02:00
Peter Šurda e00a02206b
AddrThread
- this thread is for spreading new/updated addresses in active
connections, analogous to the InvThread
- it doesn't do anything yet, this is just a dummy queue at the moment
2017-07-05 08:57:44 +02:00