Disable gevent on non-Windows. #398

Closed
fiatflux wants to merge 1 commits from pow_deadlock_fix into master
2 changed files with 15 additions and 14 deletions

View File

@ -9,19 +9,25 @@
# The software version variable is now held in shared.py # The software version variable is now held in shared.py
# import ctypes # For pre-gevent handling.
try: from sys import platform
from gevent import monkey
monkey.patch_all() # Gevent impairs some multiprocessing used by PyBitmessage on POSIX.
except ImportError as ex: # TODO(fiatflux): reconcile multiprocessing needs with AIO needs.
print "Not using the gevent module as it was not found. No need to worry." if platform == 'win32':
try:
from gevent import monkey
monkey.patch_all()
except ImportError as ex:
print "Not using the gevent module as it was not found. No need to worry."
import signal # Used to capture a Ctrl-C keypress so that Bitmessage can shutdown gracefully. import signal # Used to capture a Ctrl-C keypress so that Bitmessage can shutdown gracefully.
# The next 3 are used for the API # The next 3 are used for the API
from SimpleXMLRPCServer import *
import json import json
import singleton
import os import os
from SimpleXMLRPCServer import *
import singleton
import sys
# Classes # Classes
from class_sqlThread import * from class_sqlThread import *
@ -34,7 +40,6 @@ from class_addressGenerator import *
# Helper Functions # Helper Functions
import helper_bootstrap import helper_bootstrap
import sys
if sys.platform == 'darwin': if sys.platform == 'darwin':
if float("{1}.{2}".format(*sys.version_info)) < 7.5: if float("{1}.{2}".format(*sys.version_info)) < 7.5:
print "You should use python 2.7.5 or greater." print "You should use python 2.7.5 or greater."

View File

@ -1,11 +1,7 @@
#import shared
#import time
#from multiprocessing import Pool, cpu_count
import hashlib import hashlib
from shared import config
from struct import unpack, pack from struct import unpack, pack
import sys import sys
from shared import config
#import os
def _set_idle(): def _set_idle():
if 'linux' in sys.platform: if 'linux' in sys.platform: