Skip to main content
Invoke needs to be capitalized to work.
Source Link
Eric Brown - Cal
  • 14.5k
  • 13
  • 64
  • 105

If you don't want to block the current thread by waiting/checking for the other running thread completion, you can implement callback method like this.

Action onCompleted = () => { //On complete action }; var thread = new Thread( () => { try { // Do your work } finally { onCompleted(); } }); thread.Start(); 

If you are dealing with controls that doesn't support cross-thread operation, then you have to invoke the callback method

this.invokeInvoke(onCompleted); 

If you don't want to block the current thread by waiting/checking for the other running thread completion, you can implement callback method like this.

Action onCompleted = () => { //On complete action }; var thread = new Thread( () => { try { // Do your work } finally { onCompleted(); } }); thread.Start(); 

If you are dealing with controls that doesn't support cross-thread operation, then you have to invoke the callback method

this.invoke(onCompleted); 

If you don't want to block the current thread by waiting/checking for the other running thread completion, you can implement callback method like this.

Action onCompleted = () => { //On complete action }; var thread = new Thread( () => { try { // Do your work } finally { onCompleted(); } }); thread.Start(); 

If you are dealing with controls that doesn't support cross-thread operation, then you have to invoke the callback method

this.Invoke(onCompleted); 
Source Link

If you don't want to block the current thread by waiting/checking for the other running thread completion, you can implement callback method like this.

Action onCompleted = () => { //On complete action }; var thread = new Thread( () => { try { // Do your work } finally { onCompleted(); } }); thread.Start(); 

If you are dealing with controls that doesn't support cross-thread operation, then you have to invoke the callback method

this.invoke(onCompleted);