What's wrong with calling Invoke, regardless of InvokeRequired?

前端 未结 6 1524
春和景丽
春和景丽 2020-12-08 13:38

I\'ve seen the common setup for cross threading access to a GUI control, such as discussed here: Shortest way to write a thread-safe access method to a windows forms control

6条回答
  •  臣服心动
    2020-12-08 13:49

    One reason I can think of is performence. If most of the time the calling thread is the same as the creating thread then you'll have some unnessecry overhead.

提交回复
热议问题