none
what different between using WaitHandle or EndInvoke RRS feed

  • Question

  • what different between using WaitHandle or EndInvoke in Calling Synchronous Methods Asynchronously
    Tuesday, February 12, 2019 2:06 PM

All replies

  • A WaitHandle is something you can wait on. You would use this if you had something and wanted to block until it was done.

    EndInvoke has to be called if you've called BeginInvoke. You wouldn't call one without the other. BeginInvoke starts the async process. EndInvoke is what gets you the results back.

    The use case for these two things are dramatically different so there wouldn't be any case I can think of where you would be able to use either one. If you called BeginInvoke then EndInvoke is what you use. If you have never called BeginInvoke then EndInvoke isn't an option.

    If you want to post some sample code and an explanation about what you're trying to do then perhaps we can provide better guidance.


    Michael Taylor http://www.michaeltaylorp3.net

    Tuesday, February 12, 2019 2:59 PM
    Moderator