Re: [Vala] How to abort sorting in Gee.ArrayList?
- From: Didier 'Ptitjes' <ptitjes free fr>
- To: vala-list gnome org
- Subject: Re: [Vala] How to abort sorting in Gee.ArrayList?
- Date: Mon, 28 Jun 2010 19:18:27 +0200
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]