Click here to Skip to main content
15,914,160 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problem in disabling close button(X) of window. Pin
PIEBALDconsult15-Apr-09 6:03
mvePIEBALDconsult15-Apr-09 6:03 
NewsRe: Problem in disabling close button(X) of window. Pin
priyamtheone15-Apr-09 21:25
priyamtheone15-Apr-09 21:25 
QuestionSIteMap Pin
kibromg15-Apr-09 4:02
kibromg15-Apr-09 4:02 
AnswerRe: SIteMap Pin
hat_master15-Apr-09 6:04
hat_master15-Apr-09 6:04 
GeneralRe: SIteMap Pin
kibromg15-Apr-09 6:36
kibromg15-Apr-09 6:36 
AnswerRe: SIteMap Pin
hat_master15-Apr-09 7:18
hat_master15-Apr-09 7:18 
GeneralRe: SIteMap Pin
kibromg16-Apr-09 0:54
kibromg16-Apr-09 0:54 
QuestionStopping a Windows Service in a Timely Manner... Pin
agent00zelda15-Apr-09 3:42
agent00zelda15-Apr-09 3:42 
Hello! I recently started writing my first Windows Service project in C#, and I'm at a point now where I have a lot of time to perfect things before I continue.

I was wondering what's considered generally "good practice" with regards to Windows Services. Specifically, the stopping mechanism.

When my service starts, it kicks off a few threads that perform some file manipulation. When the service stops, I want it to shut those threads down gracefully. Ideally, shutting down the service puts the file system in a state where the manipulation can be easily resumed upon restarting the service. So, when shutting down the service, I'd prefer to let one of the threads (if it's currently doing work) finish the works it's already started, but in some cases, this can take several minutes.

Is this considered bad practice, or is this something I shouldn't really be concerned with? Are there other things anyone thinks I should consider?
AnswerRe: Stopping a Windows Service in a Timely Manner... Pin
PIEBALDconsult15-Apr-09 6:15
mvePIEBALDconsult15-Apr-09 6:15 
GeneralRe: Stopping a Windows Service in a Timely Manner... Pin
agent00zelda15-Apr-09 7:38
agent00zelda15-Apr-09 7:38 
QuestionNeed a clue with Configuration Sections Pin
Optimus Chaos15-Apr-09 3:28
Optimus Chaos15-Apr-09 3:28 
Questionoverload operator + Pin
al3xutzu0015-Apr-09 2:16
al3xutzu0015-Apr-09 2:16 
AnswerRe: overload operator + Pin
Dino Mulahusic15-Apr-09 2:25
professionalDino Mulahusic15-Apr-09 2:25 
AnswerRe: overload operator + Pin
0x3c015-Apr-09 2:28
0x3c015-Apr-09 2:28 
GeneralRe: overload operator + Pin
al3xutzu0015-Apr-09 2:41
al3xutzu0015-Apr-09 2:41 
GeneralRe: overload operator + Pin
0x3c015-Apr-09 3:05
0x3c015-Apr-09 3:05 
GeneralRe: overload operator + Pin
Luc 64801115-Apr-09 3:20
Luc 64801115-Apr-09 3:20 
GeneralRe: overload operator + Pin
OriginalGriff15-Apr-09 4:08
mveOriginalGriff15-Apr-09 4:08 
GeneralRe: overload operator + Pin
DaveyM6915-Apr-09 4:39
professionalDaveyM6915-Apr-09 4:39 
GeneralRe: overload operator + Pin
OriginalGriff15-Apr-09 5:10
mveOriginalGriff15-Apr-09 5:10 
Questionretrieve object multiple return with different types question? Pin
michaellu8815-Apr-09 2:14
michaellu8815-Apr-09 2:14 
AnswerRe: retrieve object multiple return with different types question? Pin
0x3c015-Apr-09 2:24
0x3c015-Apr-09 2:24 
GeneralRe: retrieve object multiple return with different types question? Pin
michaellu8815-Apr-09 15:14
michaellu8815-Apr-09 15:14 
Questionjoin Pin
sheemap15-Apr-09 1:40
sheemap15-Apr-09 1:40 
GeneralRe: join Pin
Pete O'Hanlon15-Apr-09 1:43
mvePete O'Hanlon15-Apr-09 1:43 

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.