On Mon, Jun 22, 2009 at 09:17:40PM +0800, Peng Jing wrote:
> Here are my questions:
> 1).
> I have read part of Pidgin's source code, but I'm still no so clear about the 
> implementation of the command processing mechanism. Could anyone tell me how 
> command processing is implemented in Pidgin?

Basically there's a hashtable that registers callbacks, and when we receive
a command we tokenize it and then look up the handler, then we just call
the handler.

> 2).
> I plan to employ some multi-threading: one thread keeps listenning to the 
> incoming commands from the server, put them in a cache, and the other thread 
> scans the cache and pick out those complete commands and enqueue them. But 
> this may involve some thread synchronization problems which are a little 
> difficult and tedious to deal with.
> Does anyone have some good ideas?

Yes, don't use threads.

-khc

_______________________________________________
Support mailing list
Support@pidgin.im
http://pidgin.im/cgi-bin/mailman/listinfo/support

You can unsubscribe from the list's website above.

Reply via email to