No Code - Just checking my facts
Posted on 2004-09-23
I have a ListView component (in report style) that is updated by nearly 500 threads (the program manages some 500 files and updates their status such as who has the file open, etc in the Listview). Each thread enters a critical section to update the ListView so that only one thread at a time is writing to the ListView - that all works as it is supposed to (so far).
However, what i want to now do is put a routine in the main program that will sort the coulmns when the user clicks on the column heading.
What i am wondering is, is it safe to sort the ListView while the threads are updating information on it? Will the main program get priority over any thread trying to update/insert data?
Or should i make it that while the column is being sorted, all other threads must wait?
I don't need code...just some advice.