python2.6 epoll.modify failed to unregister events ?

2013-07-11 Thread Ziliang Chen
Hi Guys, I have encountered an epoll issues. On the server side, I use epoll.poll() to wait for events, when there is a socket which has EPOLLIN/EPOLLUP events, I first try to read the socket (I did this coz it says EPOLLIN ready, I might think it has some data in its recv queue). After reading

Exception in thread QueueFeederThread (most likely raised during interpreter shutdown)

2013-02-20 Thread Ziliang Chen
Hi Guys, I am using the multiprocessing module. The following code snippet occasionally throws the "Exception in thread QueueFeederThread (most likely raised during interpreter shutdown)" exception. I searched google for the cause, someone says there are some issues with the multiprocessing.Que

Re: Exception in thread QueueFeederThread (most likely raised during interpreter shutdown)

2013-02-21 Thread Ziliang Chen
On Thursday, February 21, 2013 2:20:41 AM UTC+8, MRAB wrote: > On 2013-02-20 08:26, Ziliang Chen wrote: > Hi Guys, > I am using the > multiprocessing module. The following code snippet occasionally throws the > "Exception in thread QueueFeederThread (most likely raise

yield expression

2013-02-24 Thread Ziliang Chen
Hi folks, When I am trying to understand "yield" expression in Python2.6, I did the following coding. I have difficulty understanding why "val" will be "None" ? What's happening under the hood? It seems to me very time the counter resumes to execute, it will assign "count" to "val", so "val" sho

yield expression

2013-02-24 Thread Ziliang Chen
Hi folks, When I am trying to understand "yield" expression in Python2.6, I did the following coding. I have difficulty understanding why "val" will be "None" ? What's happening under the hood? It seems to me very time the counter resumes to execute, it will assign "count" to "val", so "val" sho

yield expression

2013-02-24 Thread Ziliang Chen
Hi folks, When I am trying to understand "yield" expression in Python2.6, I did the following coding. I have difficulty understanding why "val" will be "None" ? What's happening under the hood? It seems to me very time the counter resumes to execute, it will assign "count" to "val", so "val" sho

Re: yield expression

2013-02-24 Thread Ziliang Chen
On Monday, February 25, 2013 8:51:28 AM UTC+8, Oscar Benjamin wrote: > On 25 February 2013 00:39, Ziliang Chen wrote: > > > Hi folks, > > > When I am trying to understand "yield" expression in Python2.6, I did the > > following coding. I have difficulty