boostorg / boostorg/python

Embedding Python into C++ application in a multi-threaded/concurrent environment?

オープン
#409 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
537
フォーク
223
平均マージ
11時間 22分
マージ済み PR(30日)
2

説明

I am able to use **Boost.Process** to successfully execute a Python script from within a C++ application. The C++ app can obtain the data returned by Python and this is very trivial.

The problem is performance. Creating a new process needed to execute the Python script is very expensive, e.g. 60ms on a mid-level desktop Windows PC. I have not tested on Linux yet but I'm sure that there will still be a performance hit for each process.

Things that have come to mind:

- fastcgi for python
- execute python scripts concurrently in different threads (obviously without creating a new process for each script as I do at this time)

Can **Boost.Python** help me with either of these ideas? I've seen older posts online and people seem to give up with the concurrency method. Please advise, thank you.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。