Commit Graph

14 Commits

Author SHA1 Message Date
Dmitri Bogomolov d9fa6a94f4
More docstrings and formatting fixes in highlevelcrypto and shutdown 2019-11-18 13:34:01 +02:00
Dmitri Bogomolov 341651973a
Reduced imports:
- exported from network package all objects used outside;
  - made all threads available in threads module.

Wrote some module docstrings.
2019-11-11 12:03:03 +02:00
lakshyacis 503d0b33d0
shutdown quality fixes 2019-10-31 14:52:43 +05:30
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
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 4cf73675c2
flake8: bitmessagemain, class_singleCleaner, helper_generic, shutdown
and singleinstance
2018-05-21 13:37:23 +03:00
f97ada87 cb59b8abbd
component control switches 2018-04-09 15:03:02 +10:00
Peter Šurda 54c37150e0
Shutdown fixes
- tell sql thread to finish only after the other threads finished
- prevents other threads stalling on sql replies
2018-04-05 12:36:02 +02:00
Dmitri Bogomolov 0c4d4de82f
Changed the daemon check approach in other places, where it makes sense 2018-01-17 13:58:37 +02:00
Peter Šurda baba0ae206
Remove obsolete code 2018-01-01 13:04:58 +01:00
Peter Šurda 01d46c30e4
Remove obsolete imports 2017-10-19 09:03:36 +02:00
Peter Šurda 6062277d60
Rename to
- it was causing problems with py2app because the source of python's own
  CongigParser is also
2017-02-22 09:34:54 +01:00
Peter Šurda 266d8eba1f
SafeHTMLParser unicode / subprocess
- don't do subprocess in SafeHTMLParser, it doesn't work in frozen mode
  and an attempt to fix it would take too much refactoring and I'm not
  even sure it would work
- instead, make it handle broken unicode correctly
- I think the previous reports of freezes were caused by trying to
  interpret data as unicode, causing a crash
- it does about 1MB/s on my machine, so a timeout is not a big problem
2017-02-22 09:05:05 +01:00
Peter Šurda c778b81427
knownNodes refactoring and shutdown fixes
- saveKnownNodes replaced the repeated pickle.dump
- with knownNodesLock instead of acquire/release
- outgoingSynSender had an unnecessary loop during shutdown causing
  excessive CPU usage / GUI freezing
2017-02-09 11:53:33 +01:00
Peter Šurda 59f3a2fbe7
Reduce cyclic dependencies
- rearranged code to reduce cyclic dependencies
- doCleanShutdown is separated in
- shared queues are separated in
- some default values were moved to
- knownnodes partially moved to
2017-02-08 13:41:56 +01:00