在Windows中复制fork()的最佳方法是什么? [英] What's the best way to duplicate fork() in windows?

查看:103
本文介绍了在Windows中复制fork()的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何实现一些逻辑,使我能够使用Python在Windows上通过fork()系统调用重现我在Linux上具有的功能?

How do I implement some logic that will allow me to reproduce on Windows the functionality that I have on Linux with the fork() system call, using Python?

我专门尝试在SAPI Com组件上执行一种方法,同时在主线程中继续其他逻辑而不阻塞或等待.

I'm specifically trying to execute a method on the SAPI Com component, while continuing the other logic in the main thread without blocking or waiting.

推荐答案

使用python 多重处理模块随处可见.

Use the python multiprocessing module which will work everywhere.

这是 IBM developerWords文章,其中显示了如何进行转换从os.fork()到多处理模块.

Here is a IBM developerWords article that shows how to convert from os.fork() to the multiprocessing module.

这篇关于在Windows中复制fork()的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆