About the command handling of MSN protocol
khc at pidgin.im
Mon Jun 22 13:13:18 EDT 2009
On Tue, Jun 23, 2009 at 12:57:03AM +0800, Peng Jing wrote:
> I was reading the source code of 'notification.c' and 'cmdproc.c' just now.
> I saw the hash table there :-)
> But how about handling the incoming commands?
> I saw a queue there, how to keep listenning to the server, enqueue the commands and process them at the same time with a single thread?
If you make sure you don't busy wait, then command processing is very quick
and there's no reason to use another thread for it.
(Please reply to list instead of reply to me)
More information about the Support