On 07/18/2011 04:51 PM, Dan Winship wrote:
Thank for your answer.On 07/08/2011 12:27 PM, pydenonfoux wrote:In the function do_idle_run_queue, soup_add_completion is never called because priv->idle_run_queue_source is not null. Idle_run_queue is correctly called before the message was sent. I don't understand why priv->idle_run_queue_source is not null, I didn't find function which modify it between those two steps. But if I comment the 'if' my application works!idle_run_queue_source would be non-NULL if the session had already queued an idle source to run run_queue(). Removing the if should not be necessary (and in fact, may eventually cause crashes). Are you using multiple threads? SoupSessionAsync is not thread-safe, so if you are, that's your problem. Other than that, all I can say is "that can't happen", and I'd need to see the code to be able to figure out what's happening. -- Dan Yes I think the real problem could be the using multiple threads because I have a thread which loop to find new servers in real time. And the problem arrives when I try to browse a server with my main thread. And for this last action : soup_add_completion ( soup_session_get_async_context (session), idle_run_queue, session); the callback is never called... If the bug comes from thread what could you suggest me? Could I use an other version of libsoup which is thread safe? Thank a lot. Sincerely Pierre-Yves Denonfoux |