Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

Working with Threads in C# (Visual Studio 2005)

Hi Experts,

        I just started working with VisualStudio 2005 (literally today).  I am writting a comm app. to run as a windows service app.  I have created a windows service app no problem.  Now I need to learn how to work with threads in VS 2005.  I am writting my code in C#.  I have worked with threads in VS 6.0 so I am not terribly new to the concept.  However, I'm sure it's not exactly the same in VS 2005.  Therefore, I am looking for good tutorials/book(s) on Multithreading (including semaphores/CriticalSections.)

Thanks,
axnst2
0
axnst2
Asked:
axnst2
  • 3
  • 2
1 Solution
 
gbzhhuCommented:
I don't think you will needing any semaphores/CriticalSections when using threading in .NET as these will be incapsulated in classes

Some threading tutorials

http://www.codersource.net/csharp_tutorial_multithreading.html
http://www.codeproject.com/csharp/workerthread.asp
http://www.csharphelp.com/archives/archive128.html

This book seems to be aimed at threading in .NET I haven't read it so I can't comment on it

http://www.holbornbooks.co.uk/details.aspx?sn=1244553

.NET threading revolves round the Thread class in System.Threading.  You use the Lock keyword instead of semaphores/CriticalSections.  Way too many examples on the web
0
 
axnst2Author Commented:
Is it just me or did they make MultiThreading 10 times harder then it used to be?

WOW...
0
 
axnst2Author Commented:
Can someone explain me what these "delegates" are?

Every tutorial keeps talking about them like it's a common expression.  I've never heared of it?  I can tell it has something to do with multithreading, but not sure what.

Thanks,
axnst2
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
gbzhhuCommented:
Delegates are similar to C++ function pointers.  They are used for callbacks, events and threading.  In C# delegates are very common so I would spend a bit of time familiarising with them.

Have a read

http://www.devsource.ziffdavis.com/article2/0,1759,1546085,00.asp
0
 
pgloorCommented:
Take a look at:

http://www.yoda.arachsys.com/csharp/threads/

What are "critical sections"? I guess Monitor.Enter/Exit (and the lock statement) are related to this.

Peter
0
 
axnst2Author Commented:
Thanks Experts!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now