I am trying to run my recursive function "hueckel_operator()" in another thread whose stack size is increased to 10.000.000. Firstly, hueckel_operator is called when I click on detect edges button. So I have created new thread in detect_edges_click() function as
private void detect_edges_Click(object sender, EventArgs e)
{
var stackSize = 20000000;
Thread workerThread = new Thread(new ThreadStart(hueckel_operator), stackSize);
workerThread.Start();
}
public void hueckel_operator(int counter4, int counter5)
{
}
But I get an error as "Error 22 No overload for 'hueckel_operator' matches delegate 'System.Threading.ThreadStart'"
In which way I can create a new thread to execute my recursive function on?
Instead of creating a new thread should I better increase the stack size of my main thread?
Or am I talking completely nonsense and I should go on reading more about threads?
Thanks in advance