[issue32291] Value error for string shared memory in multiprocessing

hongweipeng report at bugs.python.org
Sat Sep 29 05:36:59 EDT 2018


hongweipeng <hongweichen8888 at sina.com> added the comment:

This problem seems to be support for str.

import multiprocessing
import ctypes

def child_process_fun(share):
    share.value = 'bb'

if __name__ == '__main__':
    share = multiprocessing.Value(ctypes.c_wchar_p, 'aa')
    process = multiprocessing.Process(target=child_process_fun, args=(share, ))
    process.start()
    process.join()
    print(share.value)

It also raises ValueError.When use c_double or c_int, it works well.

Test in python3.7 and 3.8

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32291>
_______________________________________


More information about the Python-bugs-list mailing list