Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #109287 > unrolled thread
| Started by | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| First post | 2016-05-31 12:31 -0400 |
| Last post | 2016-05-31 12:31 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Manipulate GIL to have Python thread work with pthread native ones Terry Reedy <tjreedy@udel.edu> - 2016-05-31 12:31 -0400
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2016-05-31 12:31 -0400 |
| Subject | Re: Manipulate GIL to have Python thread work with pthread native ones |
| Message-ID | <mailman.55.1464712287.1839.python-list@python.org> |
On 5/31/2016 1:16 AM, qshhnkf@alumni.sjtu.edu.cn wrote: > Hi Python experts, > > I need to extend Python with C/C++ to interact with an in-house > legacy API. I'm implementing a data subscriber with Python, which > subscribes to a data publisher (actually a ZeroMQ publisher socket) > and will get notified once any new messages are fed. In my > subscriber, the messages are dumped to a data processor after > received. The subscriber will also get notified by the processor when > done. Since the data processor is written in C++, I have to extend > the Python code with a simple C++ module. A couple of options you may not have considered. A. Run the C++ module in a subprocess. Pass data either in pipes or files. B. Compile the C++ module to a shared library and access via ctype module. -- Terry Jan Reedy
Back to top | Article view | comp.lang.python
csiph-web