On Sat, Feb 26, 2011 at 6:49 PM, Abderrahim Kitouni <[email protected]> wrote:
> The proper way for a "pseudo-thread" (and no, I don't know the proper
> way to say this) to terminate is to "return", i.e. if you use "yield" in
> an async method, it is suspended, but resources it has allocated aren't
> freed, so if the callback isn't called, you get a memory leak.

OUCH!
I should find a mechanism for which after each yield an async method
checks whether it has to abort its operation. To do it properly the
method that has just yield (which could be down in the stack of
various other async callers) should raise an exception so that all
methods that don't catch it free their resources.
Is this right?
Is there such a thing ready to use in the GAsync* bunch of methods?
gio.ERROR_CANCELLED sounds it to me... I have to investigate.
Is something like that planned for vala syntactic sugar?

--Luca
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to