On Mon, 2011-11-28 at 12:54 +0600, Sayem Ahmed wrote: > I don't know what's the problem here. Is it because I've created two > mainloops in a single application or there are some other reasons? I'll answer only this specific question, since I didn't look at your code: it's some other reason. Running two mainloops in separate threads (and with separate context objects) should be supported. -- Tanu