Originally posted by David Payne:
Just a thought, but is it not correct that you halt the GUI while the sort happens. Presumably you don't want the user to be making changes while another thread is sorting?
I guess someone should address this, so I'll give it a try.
You definitely don't want to "halt the GUI" in the manner it
would be if you did something computationally expensive (such
as a large sort) on the GUI thread. Not only would this prevent
the user from making changes to the table (which might be a
good thing) but this would block all GUI activity whatsoever.
So windows would not be painted when unobscured, menus wouldn't
do anything when clicked, the frame's close box wouldn't work, etc.
You may indeed want to prevent the user from making changes to
the table during the sort, but tying up the GUI thread is not
the way to do it.