File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Languages and the fly likes .NET threading question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Other Languages
Bookmark ".NET threading question" Watch ".NET threading question" New topic

.NET threading question

Rob MacKay
Ranch Hand

Joined: Apr 06, 2007
Posts: 35
Pretty straightforward question...

Writing in .NET (vb to be more precise)

How do I create a thread and have it do nothing except wait to receive an event notification, at which point some code gets executed and once the code is complete, the thread goes idle again and waits for the next notification?

I've found that if you create and start a thread that doesn't do anything, it just starts, stops and is gone.

Thanks in advance
Rob MacKay
Ranch Hand

Joined: Apr 06, 2007
Posts: 35
Mods can delete this post if they want. I've found a good solution here:
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15093

We don't delete threads when the question has been answered. Thanks for posting the solution, that might help others in the future.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: .NET threading question
It's not a secret anymore!