In my program i have some very long task, which should be interruptable from GUI (WPF). Any advices about threading architecture?
This task looks like N thread with such code:
public void DoLongOperation()
{
for(int i=beginPoint; i<endPoint; i++)
{
doSomethingStupid(dataArray[i]);
}
}