from multiprocessing import Array
g_share = Array('i', 100)
#字符串写入共享内存
g_share.value='this is share memory!'
#读共享内存中的字符串
def get_hotspot_status(self):
print('get_hotspot_status g_share=', g_share.value)
return g_share.value
from multiprocessing import Array
g_share = Array('i', 100)
#字符串写入共享内存
g_share.value='this is share memory!'
#读共享内存中的字符串
def get_hotspot_status(self):
print('get_hotspot_status g_share=', g_share.value)
return g_share.value