Click here to Skip to main content
15,915,663 members
Home / Discussions / C#
   

C#

 
QuestionHow to keep track of background threads? Pin
ptr2void27-May-08 3:09
ptr2void27-May-08 3:09 
AnswerRe: How to keep track of background threads? Pin
N a v a n e e t h27-May-08 3:12
N a v a n e e t h27-May-08 3:12 
GeneralRe: How to keep track of background threads? Pin
ptr2void27-May-08 3:15
ptr2void27-May-08 3:15 
GeneralRe: How to keep track of background threads? Pin
N a v a n e e t h27-May-08 3:18
N a v a n e e t h27-May-08 3:18 
GeneralRe: How to keep track of background threads? Pin
ptr2void27-May-08 3:24
ptr2void27-May-08 3:24 
GeneralRe: How to keep track of background threads? Pin
N a v a n e e t h27-May-08 3:41
N a v a n e e t h27-May-08 3:41 
GeneralRe: How to keep track of background threads? Pin
ptr2void27-May-08 3:52
ptr2void27-May-08 3:52 
GeneralRe: How to keep track of background threads? Pin
supercat912-Jul-08 12:21
supercat912-Jul-08 12:21 
If your goal is to have the user-interface thread run normally until the background thread dies, I would suggest having a 'quitNow' variable which is set by the background thread and polled in the main thread. The simplest approach to accomplishing that would be to have a timer that checks the 'quitNow' variable every 100ms or so. If you want to avoid the CPU overhead of doing that, you might be able to have the the timer disabled until the background thread enables it to signal its completion. I'm not sure if timer.enabled can be accessed between threads, though. If it can't, you may have to do something like:
Sub EnableKillMeTimer
  If InvokeRequired then
    BeginInvoke(New MethodInvoker(AddressOf EnableKillMeTimer))
  Else
    tmrKillMe.Enabled = True
  Endif
End Sub
While an approach like the above could probably be used to have the main form execute me.close, using a timer could make things a little nicer in case the main form doesn't want to close quite instantly.
QuestionWord Plug-in eventhandlers stops working... Pin
Anders Molin27-May-08 3:00
professionalAnders Molin27-May-08 3:00 
QuestionSetting values for anonymous types Pin
Yoyosch27-May-08 2:34
Yoyosch27-May-08 2:34 
AnswerRe: Setting values for anonymous types Pin
Colin Angus Mackay27-May-08 3:13
Colin Angus Mackay27-May-08 3:13 
QuestionHow to block popups in broswer component? Pin
asma_panjabi27-May-08 2:14
asma_panjabi27-May-08 2:14 
AnswerRe: How to block popups in broswer component? Pin
buchstaben27-May-08 5:22
buchstaben27-May-08 5:22 
GeneralRe: How to block popups in broswer component? Pin
asma_panjabi27-May-08 22:38
asma_panjabi27-May-08 22:38 
AnswerRe: How to block popups in broswer component? Pin
asma_panjabi29-May-08 0:38
asma_panjabi29-May-08 0:38 
QuestionDependency injection - Static properties Pin
N a v a n e e t h27-May-08 1:59
N a v a n e e t h27-May-08 1:59 
AnswerRe: Dependency injection - Static properties Pin
Pete O'Hanlon27-May-08 2:08
mvePete O'Hanlon27-May-08 2:08 
GeneralRe: Dependency injection - Static properties Pin
N a v a n e e t h27-May-08 2:11
N a v a n e e t h27-May-08 2:11 
GeneralRe: Dependency injection - Static properties Pin
Pete O'Hanlon27-May-08 3:00
mvePete O'Hanlon27-May-08 3:00 
GeneralRe: Dependency injection - Static properties Pin
N a v a n e e t h27-May-08 3:07
N a v a n e e t h27-May-08 3:07 
QuestionRe: Dependency injection - Static properties Pin
mr_lasseter27-May-08 6:08
mr_lasseter27-May-08 6:08 
AnswerRe: Dependency injection - Static properties Pin
N a v a n e e t h27-May-08 6:13
N a v a n e e t h27-May-08 6:13 
GeneralRe: Dependency injection - Static properties Pin
mr_lasseter27-May-08 6:30
mr_lasseter27-May-08 6:30 
GeneralRe: Dependency injection - Static properties Pin
N a v a n e e t h27-May-08 6:38
N a v a n e e t h27-May-08 6:38 
Questionhow to a a object array parameter of a WebService/WebMethod to accept DBNull ? Pin
AlbertEiki27-May-08 1:47
AlbertEiki27-May-08 1:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.