Re: [Vala] How to abort sorting in Gee.ArrayList?
- From: Didier 'Ptitjes' <ptitjes free fr>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] How to abort sorting in Gee.ArrayList?
- Date: Mon, 05 Jul 2010 23:17:59 +0200
[Hum, guess that should go to the list too...]
Hi Christer,
Could you open a feature-request ticket in Gee bug-tracker for that ?
Best regards, Didier.
On 28/06/10 20:26, Christer wrote:
Hi Didier,
Yes, the async method idea with a Cancellable argument is something I
think could work. I will try it and see what kind of results I get.
Right now Im just throwing the list away in the middle of the sorting
when a user moves to a new directory. It works, but its not very elegant. :)
Kind regards,
Christer, Sweden
2010/6/28 Didier 'Ptitjes' <ptitjes free fr <mailto:ptitjes free fr>>
Hi Christer,
On 06/27/10 10:36, Christer wrote:
> Whats a smart way of aborting sorting a list? I have objects in a
ArrayList
> being sorted using the Comparable interface. My application is
handling
> millions of items being sorted and I sometimes would like to abort the
> sorting if the user chooses to do something else.
Indeed, I think none ever submitted a such use-case.
Should the original list be left untouched in case of cancellation ? In
that case, a temporary view should be used instead of the original list.
Else, the original list would be left partially sorted (which might not
be a problem for certain use-cases).
Then I guess sort() could also be defined as an async method with an
additional Cancellable argument. Would that fit your use-case ?
> And thanks for Vala and Gee once again, Im loving the speed of
them both and
> plan to use them for many projects on Linux. :)
Glad to hear that :)
Best regards, Didier.
_______________________________________________
vala-list mailing list
vala-list gnome org <mailto:vala-list gnome org>
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]