I want to share a list with strings between processes, but unfortunately I receive the error message "ValueError: character U+169ea10 is not in range [U+0000; U+10ffff]".
Here is the Python 3 code:
from multiprocessing import Process, Array, Lock
from ctypes import c_wchar_p
import time
def run_child(a):
time.sleep(2)
print(a[0]) # print foo
print(a[1]) # print bar
print(a[2]) # print baz
print("SET foofoo barbar bazbaz")
a[0] = "foofoo"
a[1] = "barbar"
a[2] = "bazbaz"
lock = Lock()
a = Array(c_wchar_p, range(3), lock=lock)
p = Process(target=run_child, args=(a,))
p.start()
print("SET foo bar baz")
a[0] = "foo"
a[1] = "bar"
a[2] = "baz"
time.sleep(4)
print(a[0]) # print foofoo
print(a[1]) # print barbar
print(a[2]) # print bazbaz
Does someone knows what I am doing wrong?
Regards Jonny