2006/5/6, Marc Santhoff <[EMAIL PROTECTED]>:
It is the response of the compare function not the sorting one to synchronize whatever global(outside it's scope) variables is accesses, so no matter what approach you take you still will have issues with threads.
Am Freitag, den 05.05.2006, 11:03 +0300 schrieb Geno Roupsky:
> In fact you could have different function for every kind of sort and
> switch them on the fly when the properties determining the kind of
> sort that should be made changes. In my experience there is no much
> code duplication involved in this technique and you could make for
> example one compare function for every field, after that you make a
> _complex_ ones calling the simple ones.
The only thing I'm afraid of is stumbling into threading issues in the
future (most likely when I have fogotten the details of sorting ;).
It is the response of the compare function not the sorting one to synchronize whatever global(outside it's scope) variables is accesses, so no matter what approach you take you still will have issues with threads.
--
Geno Roupsky
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal