multiprocessing.sharedctypes.Value 和 multiprocessing.Value 在 python 中的区别

the difference between multiprocessing.sharedctypes.Value and multiprocessing.Value in python

我阅读了 multiprocessing.Value 的文档 https://docs.python.org/2/library/multiprocessing.html#multiprocessing.Value

和multiprocessing.sharedctypes.Value的文档 https://docs.python.org/2/library/multiprocessing.html#multiprocessing.sharedctypes.Value

但无法弄清楚它们之间有什么区别。 有人知道吗? 谢谢!

至少在 python2.7 中,Value 只是 a wrapper function 大约 sharedctypes.Value,所以只有在执行某种操作时才会注意到差异奇怪的类型检查。

在 python3.6 中,看起来 Value 仍然只是 sharedctypes.Value 的包装,但是 it takes care of passing an appropriate context.