boostorg / boostorg/python

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

Đang mở
#409 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
537
Fork
223
Merge trung bình
11 giờ 22 phút
Pull request đã merge (30 ngày)
2

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.