Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6384195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:44:44+00:00 2026-05-25T02:44:44+00:00

I understand the need to use Invoke/BeginInvoke to make calls from worker threads to

  • 0

I understand the need to use Invoke/BeginInvoke to make calls from worker threads to functions or procedures which make changes to components which belong to the UI thread…

My question is – is there a good reason to bother checking InvokeRequired? Say an event handler may be called either from a worker thread or from the UI thread in different circumstances. Are there any consequences to having the UI thread call Invoke on a method which it will itself end up executing?

Say…

Private Sub SomeProcedure() Handles event1, event2, event3
  Me.Invoke(New delegateSomeProc(Address of SomeProc))
EndSub

Now, say event1 fires from the UI thread but Events 2 and/or3 fire from some other thread… is there any peril to event1 calling invoke anyway, even though it doesn’t have to? Is it just a bit inefficient?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:44:45+00:00Added an answer on May 25, 2026 at 2:44 am

    Are there any consequences to having the UI thread call Invoke on a method which it will itself end up executing?

    The only difference that I know of is that using Invoke will fail if called before the control’s handle has been created.

    This article discusses the issues in more detail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From what I understand if I need to make request to facebook API I
I understand that I need to use LoadLibrary(). But what other steps do I
I need to understand how to use the generic Delphi 2009 TObjectList . My
I understand how to use the IComparer interface with helper classes which provide custom
I understand pointers and the rare need to use them in C# code. My
I understsand that if I want to use authentication in WCF then I need
I understand the need to test a class that has logic (for instance, one
I don't understand the need for self-joins. Can someone please explain them to me?
I need to understand the differences between windows main/mdi/child/dialogs.... how win32 messages should be
I need to understand the working of this particular program, It seems to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.