[Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.141.2.6,1.141.2.7

Anthony Baxter anthonybaxter@users.sourceforge.net
Thu, 01 Nov 2001 06:25:41 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv6080

Modified Files:
      Tag: release21-maint
	socketmodule.c 
Log Message:
wrap SSL_read and SSL_write in Py_{BEGIN,END}_ALLOW_THREADS.
other half of backport of guido's 1.188


Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.141.2.6
retrieving revision 1.141.2.7
diff -C2 -d -r1.141.2.6 -r1.141.2.7
*** socketmodule.c	2001/11/01 14:14:26	1.141.2.6
--- socketmodule.c	2001/11/01 14:25:38	1.141.2.7
***************
*** 2332,2336 ****
--- 2332,2338 ----
  		return NULL;
  
+ 	Py_BEGIN_ALLOW_THREADS
  	len = SSL_write(self->ssl, data, len);
+ 	Py_END_ALLOW_THREADS
  	return PyInt_FromLong((long)len);
  }
***************
*** 2348,2352 ****
--- 2350,2356 ----
  		return NULL;	/* Error object should already be set */
  
+ 	Py_BEGIN_ALLOW_THREADS
  	count = SSL_read(self->ssl, PyString_AsString(buf), len);
+ 	Py_END_ALLOW_THREADS
  	res = SSL_get_error(self->ssl, count);