Threads in Windows Service
-
Hi!! Can anyone tell me if i can use threading in my windows service... i've 3 module which i want to run concurrently.. will it be easier to run by threads or on timer basis...
Of course you can use multiple threads inside a Windows Service. Whether or not you should is something that we can't tell you unless you provide more information.
-
Hi!! Can anyone tell me if i can use threading in my windows service... i've 3 module which i want to run concurrently.. will it be easier to run by threads or on timer basis...
-
You can use threads easily in windows services. But if you can use .net 40 I'd suggest you check the new Task Parallel Library before you decide.
geo_m wrote:
But if you can use .net 40 I'd suggest you check the new Task Parallel Library before you decide.
.net 40? I want your time machine.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
Hi!! Can anyone tell me if i can use threading in my windows service... i've 3 module which i want to run concurrently.. will it be easier to run by threads or on timer basis...
You're actually expected to use threads in a service. IMHO, using a timer to hold up your service is just an excuse to not learn threading. Too many schmucks try to use a timer to do something that it's not designed to do and doesn't fit the problem they're trying to solve.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
geo_m wrote:
But if you can use .net 40 I'd suggest you check the new Task Parallel Library before you decide.
.net 40? I want your time machine.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
heh, too many dots - .net 4.0 is exact. We're used here to write it in this short manner .net20, .net30, .net35, .net40. I use it so often - googling, referencing, also can be found in some original microsoft comments so I didn't even realize that it's a way too ahead in time :)