<br><br><div><span class="gmail_quote">2006/5/6, Marc Santhoff <<a href="mailto:M.Santhoff@t-online.de">M.Santhoff@t-online.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Am Freitag, den 05.05.2006, 11:03 +0300 schrieb Geno Roupsky:<br>> In fact you could have different function for every kind of sort and<br>> switch them on the fly when the properties determining the kind of<br>> sort that should be made changes. In my experience there is no much
<br>> code duplication involved in this technique and you could make for<br>> example one compare function for every field, after that you make a<br>> _complex_ ones calling the simple ones.<br><br>The only thing I'm afraid of is stumbling into threading issues in the
<br>future (most likely when I have fogotten the details of sorting ;).</blockquote><div><br>
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.<br>
</div></div><br>-- <br>Geno Roupsky