Re: [PATCH] fixes an issue when main thread is sleeping when receiving data.

Vincent CHAVANIS <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
I've experiences somes troubles when sending 3500 msg/sec
Sometimes, the main thread_id is freezed.


# On the code executed below:

     sended = run_batch();

     info(0," mark#1 ");

     /* avoid exiting before sending all msgs */
     while(sended > counter_value(counter)) {
         info(0," mark#2 ");
         gwthread_sleep(0.1);
     }


# i got this:

2009-04-17 11:31:55.0720 [22720] [0] DEBUG: message length 130, sending 1 messages
2009-04-17 11:31:55.0720 [22720] [0] DEBUG: message length 130, sending 1 messages
2009-04-17 11:31:55.0720 [22720] [0] DEBUG: message length 130, sending 1 messages
2009-04-17 11:31:55.0721 [22720] [0] DEBUG: message length 130, sending 1 messages
2009-04-17 11:31:55.0721 [22720] [0] INFO: mtbatch has processed 999 messages with 0 errors
2009-04-17 11:31:55.0721 [22720] [0] INFO:  mark#1
2009-04-17 11:31:55.0721 [22720] [0] INFO:  mark#2
(freezed)
^C




Alexander Malysh a écrit :
> Hi,
> 
> I don't get it, why this patch is needed? Could you please describe in 
> detail?
> 
> Thanks,
> Alex
> 
> Am 16.04.2009 um 12:36 schrieb Vincent CHAVANIS:
> 
>>
>> - When main thread is sleeping and receiving data by bearerbox,
>> we will be into an infinite loop.
>>
>> This patch fix this by waking-up the main thread.
>>
>> Vincent.
>>
>>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.