This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients sys, vstinner
Date 2014-12-11.11:36:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1418297800.45.0.552359995718.issue23022@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-12-11 11:36:40vstinnersetrecipients: + vstinner, sys
2014-12-11 11:36:40vstinnersetmessageid: <1418297800.45.0.552359995718.issue23022@psf.upfronthosting.co.za>
2014-12-11 11:36:40vstinnerlinkissue23022 messages
2014-12-11 11:36:40vstinnercreate