Embedding Python into C++ application in a multi-threaded/concurrent environment?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 15/100
Research direction
This is a usage question about embedding Python in a C++ application, with Boost.Process, Boost.Python, FastCGI, and threaded execution mentioned but no repository files or tests identified. First clarify which supported integration behavior is requested; a contribution would need a concrete scope and an agreed definition of done.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C++
- Stars
- 537
- Forks
- 223
- Avg merge
- 11h 22m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/python
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
BoostDetectToolset-1.90.0.cmake file not found in an include() call in boost_python-config.cmake Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100