eric7.Utilities.BackgroundClient
Module implementing a Qt free version of a background client for the various
checkers and other python interpreter dependent functions.
Global Attributes
Classes
Functions
BackgroundClient
Class implementing the main part of the background client.
Derived from
None
Class Attributes
Class Methods
Methods
BackgroundClient |
Constructor |
__cancelled |
Private method to check for a job cancellation. |
__initClientService |
Private method to import the given module and register it as service. |
__peek |
Private method to peek the given length of bytes. |
__receive |
Private method to receive the given length of bytes. |
__send |
Private method to send a job response back to the BackgroundService server. |
run |
Public method implementing the main loop of the client. |
Static Methods
BackgroundClient (Constructor)
BackgroundClient(host, port, maxProcs)
Constructor
- host (str)
-
ip address the background service is listening
- port (int)
-
port of the background service
- maxProcs (int)
-
maximum number of CPUs (processes) to use
(0 = determined automatically)
BackgroundClient.__cancelled
__cancelled()
Private method to check for a job cancellation.
- Return:
-
flag indicating a cancellation
- Return Type:
-
bool
BackgroundClient.__initClientService
__initClientService(fn, path, module)
Private method to import the given module and register it as service.
- fn (str)
-
service name to register
- path (str)
-
contains the path to the module
- module (str)
-
name to import
- Return:
-
text result of the import action
- Return Type:
-
str
BackgroundClient.__peek
__peek(length)
Private method to peek the given length of bytes.
- length (int)
-
bytes to receive
- Return:
-
received bytes
- Return Type:
-
bytes
BackgroundClient.__receive
__receive(length)
Private method to receive the given length of bytes.
- length (int)
-
bytes to receive
- Return:
-
received bytes or None if connection closed
- Return Type:
-
bytes
BackgroundClient.__send
__send(fx, fn, data)
Private method to send a job response back to the BackgroundService
server.
- fx (str)
-
remote function name to execute
- fn (str)
-
filename for identification
- data (any basic datatype)
-
return value(s)
BackgroundClient.run
run()
Public method implementing the main loop of the client.
- Raises RuntimeError:
-
raised if hashes don't match