多平台多处理? [英] Multiplatform multiprocessing?

查看:58
本文介绍了多平台多处理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道为什么在新的C ++ 11中,他们添加了线程而不是进程.

I was wondering why in the new C++11 they added threads and not processes.

他们难道没有对平台特定的功能进行包装吗?

Couldn't have they done a wrapper around platform specific functions?

关于最便携的多处理方式的任何建议吗?叉()? OpenMP?

Any suggestion about the most portable way to do multiprocessing? fork()? OpenMP?

推荐答案

我正在使用提升进程间.

它不提供创建新流程的可能性,但是一旦它们存在,便允许它们进行通信.

It does not provide the possibility to create new processes, but once they are there, it allows them to communicate.

在这种情况下,我可以从shell脚本中创建所需的进程.

In this particular case I can create the processes I need from a shell script.

这篇关于多平台多处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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