Re: [Vala] libsoup Session.Async does not send stuff



On Fri, 2013-11-01 at 03:04 +0100, Daniel Brendle wrote:
On Thu, 2013-10-31 at 20:03 +0100, Luca Bruno wrote:
Keep the session alive here: Soup.SessionSync session = new
Soup.SessionSync ();
Add that as a server instance. Also, keep the server itself alive
somewhere.

Acutally this worked. Now i think i understand. The lifetime of the
SessionAsync ended, when it left the scope of the closure, this triggers
the real_cancel_message-method on all queued messages through some kind
of destructor.

Glad that worked. But there are some loose
ends.

It didn't work before because the lambda doesn't
contain "session", and hence session got destroyed.

But...

(A) it doesn't explain why the proxy works (in a
non-reentrant manner) when "server" and "msg"
are static, but not "session". Shouldn't
"session" be destroyed?

(B) it doesn't explain why the original post
didn't work. The lambda increases the refcounts
of "server" and "msg" and hence they should
still be alive. But apparently not. Why?

(A) and (B) should both work, or both fail,
because their difference is simply this:

   keep server and msg alive using static
     vs
   keep server and msg alive by incrementing
   their refcounts


Nice day
Nor Jaidi Tuah




PRIVILEGED/CONFIDENTIAL information may be contained in this message. If you are neither the addressee 
(intended recipient) nor an authorised recipient of the addressee, and have received this message in error, 
please destroy this message (including attachments) and notify the sender immediately. STRICT PROHIBITION: 
This message, whether in part or in whole, should not be reviewed, retained, copied, reused, disclosed, 
distributed or used for any purpose whatsoever. Such unauthorised use may be unlawful and may contain 
material protected by the Official Secrets Act (Cap 153) of the Laws of Brunei Darussalam. DISCLAIMER: 
We/This Department/The Government of Brunei Darussalam, accept[s] no responsibility for loss or damage 
arising from the use of this message in any manner whatsoever. Our messages are checked for viruses but we do 
not accept liability for any viruses which may be transmitted in or with this message.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]