Click here to Skip to main content
15,881,852 members
Home / Discussions / C#
   

C#

 
AnswerRe: To use or not to use worker thread in Windows Service? Pin
PIEBALDconsult26-Jul-10 8:51
mvePIEBALDconsult26-Jul-10 8:51 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
JoeSchmoe00726-Jul-10 9:00
JoeSchmoe00726-Jul-10 9:00 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
PIEBALDconsult26-Jul-10 9:20
mvePIEBALDconsult26-Jul-10 9:20 
AnswerRe: To use or not to use worker thread in Windows Service? Pin
Gonzalo Cao26-Jul-10 20:46
Gonzalo Cao26-Jul-10 20:46 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
Chris Trelawny-Ross27-Jul-10 5:37
Chris Trelawny-Ross27-Jul-10 5:37 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
Gonzalo Cao27-Jul-10 8:28
Gonzalo Cao27-Jul-10 8:28 
AnswerRe: To use or not to use worker thread in Windows Service? Pin
RugbyLeague26-Jul-10 23:34
RugbyLeague26-Jul-10 23:34 
AnswerRe: To use or not to use worker thread in Windows Service? Pin
N a v a n e e t h27-Jul-10 0:54
N a v a n e e t h27-Jul-10 0:54 
JoeSchmoe007 wrote:
Is there any reason to prefer worker thread approach?


It depends on what you are trying to do. Timer is used when you want to get the callback in periodic intervals. One thing to note is, timer will fire the callback even if the previous call is in progress. All it does is queuing the job to a thread pool thread.

If you don't have something to execute periodically, spawn a thread or use one from thread pool. I have seen people simulating the timer's behavior by spawning worker threads and sleeping on it, which is of course a bad design.

There is no difference internally because both are using separate thread to do the job.

Smile | :)
Best wishes,
Navaneeth

GeneralRe: To use or not to use worker thread in Windows Service? Pin
JoeSchmoe00727-Jul-10 3:04
JoeSchmoe00727-Jul-10 3:04 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
N a v a n e e t h27-Jul-10 4:51
N a v a n e e t h27-Jul-10 4:51 
QuestionResolved C# Socket programming with linux machine. [modified] Pin
jobin00700726-Jul-10 5:10
jobin00700726-Jul-10 5:10 
AnswerRe: C# Socket programming with linux machine. Pin
Richard MacCutchan26-Jul-10 6:13
mveRichard MacCutchan26-Jul-10 6:13 
AnswerRe: C# Socket programming with linux machine. Pin
PIEBALDconsult26-Jul-10 7:21
mvePIEBALDconsult26-Jul-10 7:21 
AnswerRe: Resolved C# Socket programming with linux machine. Pin
jobin00700727-Jul-10 5:33
jobin00700727-Jul-10 5:33 
QuestionWindows or Console application target for Windows Service? Pin
JoeSchmoe00726-Jul-10 3:43
JoeSchmoe00726-Jul-10 3:43 
AnswerRe: Windows or Console application target for Windows Service? Pin
darkelv26-Jul-10 4:04
darkelv26-Jul-10 4:04 
AnswerRe: Windows or Console application target for Windows Service? [modified] Pin
PIEBALDconsult26-Jul-10 6:55
mvePIEBALDconsult26-Jul-10 6:55 
QuestionMouse Hover/Leave with many controls and status strip message Pin
Blubbo26-Jul-10 3:05
Blubbo26-Jul-10 3:05 
AnswerRe: Mouse Hover/Leave with many controls and status strip message Pin
Blubbo26-Jul-10 4:16
Blubbo26-Jul-10 4:16 
QuestionFTP transfer corrupts .PNG files Pin
anthasaurus26-Jul-10 2:06
anthasaurus26-Jul-10 2:06 
AnswerRe: FTP transfer corrupts .PNG files Pin
Nagy Vilmos26-Jul-10 2:18
professionalNagy Vilmos26-Jul-10 2:18 
GeneralRe: FTP transfer corrupts .PNG files Pin
anthasaurus26-Jul-10 23:10
anthasaurus26-Jul-10 23:10 
QuestionSelection Formula in crystal report Pin
Nikhil Bhivgade26-Jul-10 1:21
professionalNikhil Bhivgade26-Jul-10 1:21 
QuestionWhat API to use? Pin
c242326-Jul-10 0:54
c242326-Jul-10 0:54 
AnswerRe: What API to use? Pin
Eddy Vluggen26-Jul-10 1:19
professionalEddy Vluggen26-Jul-10 1:19 

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.