Re: (Win32 API) callback to Python, threading hiccups
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: (Win32 API) callback to Python, threading hiccups

From: Christopher Subich <spam.csubich+block@block.subich.spam.com>
Date: Tue Jul 05 2005 - 21:21:49 CEST

Francois De Serres wrote:
> - so, on callback, I create a new thread, after checking that the
> previous one has returned already (WaitOnSingleObject(mythread)) so we
> only have one thread involved.

Uh... to me, this looks like a frighteningly inefficient way of doing
things. How about using a synchronous queue to post the data to a
processing thread? That way, you don't have to create an entierly new
thread each time you receive data in the callback.
Received on Thu Sep 29 16:46:26 2005