我阅读了 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 .
关于python - python中multiprocessing.sharedctypes.Value和multiprocessing.Value的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42490839/