I have a strange issue. I have following code in my function:
if (this.InvokeRequired)
{
this.BeginInvoke((MethodInvoker)delegate
{
LoadGamesAndRefreshView();
});
return;
}
presenter.LoadGames();
presenter.ApplyFilter();
The presenter Method presenter.ApplyFilter() calls the View to update an UI Element.
The posted code (the function) is called over WCF, so from a different thread, so I have to invoke this. This works fine, but I have to call this function sometimes in a loop, so there are coming approx 15-20 calls of this function over WCF. When I do this, my client crashes because it was in wrong thread and cant change UI elements.
For each Function the server creates his own thread.