L
LP
Hi,
I have a method that's called from another thread through a delegate. It's
checking if (InvokeRequired){} and does BeginInvoke() if true. So it will be
executed on the same UI thread. here's the code in question:
private void wrkP_OnProcessCompleted(WorkerProcessBalanceEventArgs e)
{
if (InvokeRequired)
{
BeginInvoke(new delegateUpdateProgress(wrkP_OnProcessCompleted), new
object[] {e});
return;
}
anotherPrivateFunction();
//more code here
}
Question do I need a delegate for anotherPrivateFunction(); or it will
be executed by UI thread anyway?
I have a method that's called from another thread through a delegate. It's
checking if (InvokeRequired){} and does BeginInvoke() if true. So it will be
executed on the same UI thread. here's the code in question:
private void wrkP_OnProcessCompleted(WorkerProcessBalanceEventArgs e)
{
if (InvokeRequired)
{
BeginInvoke(new delegateUpdateProgress(wrkP_OnProcessCompleted), new
object[] {e});
return;
}
anotherPrivateFunction();
//more code here
}
Question do I need a delegate for anotherPrivateFunction(); or it will
be executed by UI thread anyway?