#NEWLINE# def test_shared_const_arg( ) : #NEWLINE# #INDENT# global PORT #NEWLINE# PORT += 1 #NEWLINE# def start_server( ) : #NEWLINE# #INDENT# const_arg = { #NEWLINE# #INDENT# 1 : 1 , #NEWLINE# 2 : 2 , #NEWLINE# 3 : 3 , #NEWLINE# #UNINDENT# } #NEWLINE# arg = [ 10 , 20 , 30 ] #NEWLINE# with jobmanager . JobManager_Server ( authkey = AUTHKEY , port = PORT , const_arg = const_arg , fname_dump = None ) as server : #NEWLINE# #INDENT# server . args_from_list ( arg ) #NEWLINE# server . start ( ) #NEWLINE# #UNINDENT# print ( 'const_arg at server side' , const_arg ) #NEWLINE# #UNINDENT# def start_client( ) : #NEWLINE# #INDENT# class myClient ( jobmanager . JobManager_Client ) : #NEWLINE# #INDENT# @ staticmethod #NEWLINE# def func( arg , const_arg ) : #NEWLINE# #INDENT# const_arg [ os . getpid ( ) ] = os . getpid ( ) #NEWLINE# print ( os . getpid ( ) , arg , const_arg ) #NEWLINE# return None #NEWLINE# #UNINDENT# #UNINDENT# client = myClient ( server = SERVER , authkey = AUTHKEY , port = PORT , nproc = 1 , verbose = 2 ) #NEWLINE# client . start ( ) #NEWLINE# #UNINDENT# PORT += 1 #NEWLINE# p1 = mp . Process ( target = start_server ) #NEWLINE# p2 = mp . Process ( target = start_client ) #NEWLINE# p1 . start ( ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# p2 . start ( ) #NEWLINE# p2 . join ( ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# p1 . join ( )