Re: [Vala] Need help in debugging async code



I'm sorry the url is: https://bugzilla.gnome.org/show_bug.cgi?id=772084

2016-09-27 22:38 GMT+02:00 Michele Dionisio <michele dionisio gmail com>:
I think that now the patch is ok. I have add a bug for that on gnome bugzilla:
https://bugzilla.gnome.org/show_bug.cgi?id=772084

regards

2016-09-24 10:33 GMT+02:00 Nor Jaidi Tuah <norjaidi tuah ubd edu bn>:

now,

_state_in_progress_ is assigned to -1 at beginning
the check if

_state_in_progress_ == _state_ is move before the switch to work in
any state.


That won't work either.

The fundamental problem is that the caller
that calls the callback (the mainloop or
whatever alternative you have in mind) must
be able to detect when the async method has
progressed to the next state. For the mainloop
solution, this is trivial. The alternative
you have in mind (that calls before yield)
must look at _state_ and _state_in_progress_;
otherwise, it may livelock.

There is no way you can solve this by tweaking
async only[1]; you must also tweak the callback caller.
I don't think the Vala community would accept that.



[1] Of course I may be wrong in this assertion.

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]