[ Answers ]
The alternative to ctypes.c_wchar_p
string is to use ctypes.c_char
bytes-string. The downside is you need to .decode()
and .encode()
each time you access the value.
Use multiprocessing.Array('c', b'bytes-string')
to replace Value()
for string shared memory. Using Value()
will raise in an exception "bytes is too long"
[ Summary ]
As summary for future self:
multiprocessing.Array()
for shared stringmultiprocessing.Value()
for shared intmultiprocessing.shared_memory.ShareableList()
for shared listmultiprocessing.Manager()
for shared memory as Proxy, unrecommended because it's slow.