Hi Robert,

Thanks for the patch!

As you pointed out, waiting in an event handler does block the event queue, which seems obvious. This also means that waiting in an event handler is not really the way it should be implemented, except for very few things.

Moreover, Stefan has made some plans to use a threadpool for the session event loop, instead of having one thread per session. This increases the performances dramatically when running signaling only applications. The drawback is that the event loop becomes even more sensible, as blocking in an event handler will also prevent other sessions from being processed.

So the crucial question is: how long do you wait there? If it is more than a few 10s of milliseconds, you might run into troubles once we have introduced the session threadpool.

With a little bit more explaination, we might be able to discuss a more asynchronous / scalable solution to your issue.

Cheers

Raphael.

On 14.04.10 15:09, Robert Szokovacs wrote:
Hi,

I started using AmCondition and noticed it didn't wrap
pthread_cond_timedwait(). As I couldn't use UserTimer because I wait in
onInvite() so the timeout events don't get delivered, I added the
functionality to AmCondition. Patch attached.




br

Szo

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to