dragon.globalservices.api_setup
API for managing the life-cycle of objects, such as processes and channels, through Global Services
Functions
|
|
|
Posts a message to GS and gets the response in a thread safe way |
|
|
|
|
|
- next_tag()
- get_gs_ret_cuid()
- load_launch_parameter(name)
- gs_request(req_msg, *, expecting_response=True)
Posts a message to GS and gets the response in a thread safe way
This is an attempt to make global services transactions blocking and thread safe while avoiding needless head of queue blocking - we don’t want there to be only one transaction outstanding at a time because it might take a long time to finish and block other threads’ transactions in the meantime, but without starting a separate dedicated thread simply to deal and service gs transactions. The implementation here tries to solve this without involving a new thread at all, but that might not be the best way to do it; a separate service thread would probably be simpler.
The overhead of doing this stuff if only one thread is ever involved means acquiring a couple locks that have no contention on them and constructing an event variable which means another lock.
- Arguments:
- param req_msg:
request message to send.
- param expecting_response:
Bool default True, is a response message expected?
- Returns:
the reply to the request message
- test_connection_override(test_gs_input=None, test_gs_return=None, test_gs_return_cuid=None, test_shep_input=None, test_shep_return=None, test_shep_return_cuid=None)
- connect_to_infrastructure(force=False)