A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-September/074497.html below:

[Python-Dev] working with Python threads from C extension module?

[Python-Dev] working with Python threads from C extension module? [Python-Dev] working with Python threads from C extension module?Hrvoje Nikšić hrvoje.niksic at avl.com
Sat Sep 8 12:36:48 CEST 2007
On Fri, 2007-09-07 at 16:20 -0700, Bill Janssen wrote:
> > #define SSL_ALLOW_THREADS {if (_ssl_locks != NULL) { Py_BEGIN_ALLOW_THREADS }}
> > #define SSL_DISALLOW_THREADS {if (_ssl_locks != NULL) { Py_BEGIN_ALLOW_THREADS }}
> 
> I'd forgotten how convoluted Py_BEGIN_ALLOW_THREADS and
> Py_END_ALLOW_THREADS were.  Anyone have any other suggestions about
> how to do this?

Be convoluted yourself and do this:

#define PySSL_BEGIN_ALLOW_THREADS { if (_ssl_locks) { Py_BEGIN_ALLOW_THREADS
#define PySSL_END_ALLOW_THREADS Py_END_ALLOW_THREADS } }

(Untested, but I think it should work.)


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4