STINNER Victor added the comment:
Your code is strange. It exchanges pointer between processes if I understand
correctly:
class Berbagi(ctypes.Structure):
_fields_ = [('a', ctypes.c_wchar_p), ('b', ctypes.c_double) ]
nilai = multiprocessing.Array(Berbagi, [Berbagi() for x in range(9)] )
You must not do that. Instead, Berbagi.a must be an array of c_wchar characters
with a fixed size. Try for example:
class Berbagi(ctypes.Structure):
_fields_ = [('a', ctypes.c_wchar * 10), ('b', ctypes.c_double) ]
Note: I'm not sure that ctypes is the most efficient module to serialize data,
but maybe you have to use ctypes for a reason not explained in your issue.
The bug is in your code, not in Python.
----------
resolution: -> not a bug
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23022>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com