Click here to Skip to main content
15,891,765 members
Home / Discussions / C#
   

C#

 
GeneralDatabase update Pin
Hovik Melkomian14-Jul-03 4:43
Hovik Melkomian14-Jul-03 4:43 
GeneralRe: Database update Pin
Mazdak14-Jul-03 5:24
Mazdak14-Jul-03 5:24 
GeneralShell Context Menu Handlers Pin
Scott Lee14-Jul-03 4:14
Scott Lee14-Jul-03 4:14 
GeneralRe: Shell Context Menu Handlers Pin
Nick Parker14-Jul-03 4:31
protectorNick Parker14-Jul-03 4:31 
QuestionObfuscator / Optimizer? Pin
Rocky Moore14-Jul-03 4:02
Rocky Moore14-Jul-03 4:02 
AnswerRe: Obfuscator / Optimizer? Pin
leppie14-Jul-03 7:20
leppie14-Jul-03 7:20 
AnswerRe: Obfuscator / Optimizer? Pin
J. Dunlap14-Jul-03 7:58
J. Dunlap14-Jul-03 7:58 
GeneralRe: Obfuscator / Optimizer? Pin
leppie14-Jul-03 9:07
leppie14-Jul-03 9:07 
GeneralRe: Obfuscator / Optimizer? Pin
J. Dunlap14-Jul-03 10:40
J. Dunlap14-Jul-03 10:40 
GeneralSql Currency and a textBox Pin
totig14-Jul-03 1:57
totig14-Jul-03 1:57 
GeneralRe: Sql Currency and a textBox Pin
Not Active14-Jul-03 2:35
mentorNot Active14-Jul-03 2:35 
GeneralRe: Sql Currency and a textBox Pin
totig14-Jul-03 2:49
totig14-Jul-03 2:49 
QuestionHow to paste external window to my form? Pin
..Hubert..14-Jul-03 1:37
..Hubert..14-Jul-03 1:37 
GeneralChanging the Form's title text Pin
eggie513-Jul-03 22:02
eggie513-Jul-03 22:02 
GeneralRe: Changing the Form's title text Pin
J. Dunlap13-Jul-03 22:06
J. Dunlap13-Jul-03 22:06 
GeneralRe: Changing the Form's title text Pin
eggie513-Jul-03 22:08
eggie513-Jul-03 22:08 
GeneralRe: Changing the Form's title text Pin
Rocky Moore13-Jul-03 22:10
Rocky Moore13-Jul-03 22:10 
GeneralRe: Changing the Form's title text Pin
Rocky Moore13-Jul-03 22:11
Rocky Moore13-Jul-03 22:11 
GeneralRe: Changing the Form's title text Pin
eggie513-Jul-03 22:14
eggie513-Jul-03 22:14 
QuestionCan one thread see that the other one's dead? Pin
Bog13-Jul-03 19:46
Bog13-Jul-03 19:46 
I have two theads in my windows app- the main GUI thread, and a constantly listening worker which runs an infinite while(true) loop.

The problem is, when I quit the app, the worker thread keeps running and sucks up 100% CPU time. So, I have the main gui thread set a bool variable to false when the app's window closes, and then in the loop for the worker, it listens for that and kills itself when it sees that the bool is false.

That's all fine, but my fear is what if the main window of the app gets blown up, and it's "window closing" event never fires? Like, if the main window is closed because it throws some low level error or something. I've seen it happen already.

In that case, the worker thread would never get the signal to die. Is there some other way to make the worker check on the existence of the gui thread?

thanks



"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx

AnswerRe: Can one thread see that the other one's dead? Pin
Richard Deeming14-Jul-03 2:05
mveRichard Deeming14-Jul-03 2:05 
GeneralRe: Can one thread see that the other one's dead? Pin
Bog14-Jul-03 8:54
Bog14-Jul-03 8:54 
GeneralChanging a button Pin
eggie513-Jul-03 18:13
eggie513-Jul-03 18:13 
GeneralRe: Changing a button Pin
Nick Parker13-Jul-03 19:04
protectorNick Parker13-Jul-03 19:04 
GeneralRe: Changing a button Pin
eggie513-Jul-03 19:44
eggie513-Jul-03 19:44 

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.