Click here to Skip to main content
16,011,532 members
Home / Discussions / C#
   

C#

 
GeneralRe: error stop a Windows service Pin
leppie29-May-08 22:05
leppie29-May-08 22:05 
GeneralRe: error stop a Windows service Pin
George_George29-May-08 23:22
George_George29-May-08 23:22 
GeneralRe: error stop a Windows service Pin
leppie29-May-08 23:55
leppie29-May-08 23:55 
GeneralRe: error stop a Windows service Pin
George_George30-May-08 0:03
George_George30-May-08 0:03 
GeneralRe: error stop a Windows service Pin
Zoltan Balazs29-May-08 22:08
Zoltan Balazs29-May-08 22:08 
GeneralRe: error stop a Windows service Pin
George_George29-May-08 23:21
George_George29-May-08 23:21 
AnswerRe: error stop a Windows service Pin
#realJSOP29-May-08 23:22
professional#realJSOP29-May-08 23:22 
GeneralRe: error stop a Windows service Pin
George_George29-May-08 23:38
George_George29-May-08 23:38 
Thanks John,


1.

I have tried your solution can work. My fix code is, leaving OnStop method empty, and the worker thread will sleep 2 seconds, do some work and check whether the controller's status is not Runnning, if not Running, I will stop the worker thread. Is my solution correct?

2.

I think in this solution, the main thread will stopped at first when we choose to stop the service, then the worker thread will stop later, when the main thread exits the OnStop service (when the controller's status is not Runnning)?

3.

If the answer to 2 is yes, my question is, the worker thread in a Windows service is allowed to be stopped after the main thread?


regards,
George
GeneralRe: error stop a Windows service Pin
#realJSOP30-May-08 0:41
professional#realJSOP30-May-08 0:41 
GeneralRe: error stop a Windows service Pin
George_George31-May-08 1:27
George_George31-May-08 1:27 
QuestionByte to Bool Array Pin
half-life29-May-08 21:08
half-life29-May-08 21:08 
AnswerRe: Byte to Bool Array Pin
leppie29-May-08 21:58
leppie29-May-08 21:58 
GeneralRe: Byte to Bool Array Pin
half-life29-May-08 22:41
half-life29-May-08 22:41 
GeneralRe: Byte to Bool Array Pin
Guffa30-May-08 0:39
Guffa30-May-08 0:39 
Questiondll... load another version... Pin
JoZ CaVaLLo29-May-08 21:08
JoZ CaVaLLo29-May-08 21:08 
AnswerRe: dll... load another version... Pin
leppie29-May-08 21:59
leppie29-May-08 21:59 
GeneralRe: dll... load another version... Pin
JoZ CaVaLLo30-May-08 0:05
JoZ CaVaLLo30-May-08 0:05 
QuestionPanel's MouseUp event firing on Form resize Pin
dan!sh 29-May-08 21:04
professional dan!sh 29-May-08 21:04 
QuestionRe: Panel's MouseUp event firing on Form resize Pin
buchstaben29-May-08 22:45
buchstaben29-May-08 22:45 
AnswerRe: Panel's MouseUp event firing on Form resize Pin
dan!sh 29-May-08 22:57
professional dan!sh 29-May-08 22:57 
AnswerRe: Panel's MouseUp event firing on Form resize Pin
buchstaben29-May-08 23:06
buchstaben29-May-08 23:06 
GeneralRe: Panel's MouseUp event firing on Form resize Pin
leppie29-May-08 23:09
leppie29-May-08 23:09 
GeneralRe: Panel's MouseUp event firing on Form resize Pin
buchstaben29-May-08 23:13
buchstaben29-May-08 23:13 
GeneralRe: Panel's MouseUp event firing on Form resize Pin
leppie29-May-08 23:57
leppie29-May-08 23:57 
GeneralRe: Panel's MouseUp event firing on Form resize Pin
dan!sh 29-May-08 23:16
professional dan!sh 29-May-08 23:16 

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.