Interrupt BeginInvoke

Hello,
in the last two hours I tried to understand if it is possible to terminate from the calling thread a method called asynchronously using the BeginInvoke pattern, but I was not able to find any solutions.

Can you help me to get an answer to this question

Thanks in advance,
Marco


Answer this question

Interrupt BeginInvoke

  • Rajesh batchu

    No. All you got is an IAsyncResult, not enough to get a reference to the thread pool thread.


  • saju

    Practically you are saying that there is no way to retrieve the thread created with the BeginInvoke from the Thread Pool. So probably I have to use the Thread class or the BackgroundWorker in order to have the possibility to stop the thread from the calling form





  • Richard0610

    If you need to manage the life-time of the thread in order to be able to stop it, you'll indeed need to use a Thread or BackgroundWorker.


  • Interrupt BeginInvoke