c# - context swtich between thread.start and thread.join -


is there bad effect if there context switch between thread.start , thread.join? if thread finish executing before join, happen?

it depend bit on child thread doing you, if main thread creates child , more concurrent work while child thread away , child finishes execution first will, @ worst, have race condition. when have things happen in code depend on child thread doing work not implementing controls stop main thread proceeding if depends on work being finished.

ultimately call .join result in instantanious return method wait until child thread/s have finished execution. however, watch out accidental race conditions, can right nightmare debug!


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -