By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

Running a thread with timeout

P: n/a
Hi,

I'm fairly new to threading and i would like to start a new thread but when
the thread isn't completed within 30 seconds i would like the thread to end
and resume the procedure that started the thread. Preferably with an event.

I tried to find information on the internet but i can't find a sample that i
understand.
The samples that are provided include several other things that i think i
don't need.
Language is a problem and i can't find any (good) samples in my own language.

If you can, please help, it would be greatly appriciated

Thanks in advance!

Rob Smeets

Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

My first thought is that if you are "resuming the procedure that started the
thread", you are wanting to block the program until the thread finishes or
times out. If this is the case, do you really need a thread at all?

"Rob Smeets" <Ro*******@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.com...
Hi,

I'm fairly new to threading and i would like to start a new thread but
when
the thread isn't completed within 30 seconds i would like the thread to
end
and resume the procedure that started the thread. Preferably with an
event.

I tried to find information on the internet but i can't find a sample that
i
understand.
The samples that are provided include several other things that i think i
don't need.
Language is a problem and i can't find any (good) samples in my own
language.

If you can, please help, it would be greatly appriciated

Thanks in advance!

Rob Smeets


Nov 21 '05 #2

P: n/a
Did you try thread.suspend , thread.sleep etc etc it has lot of
options.

Regards,
C#, VB.NET , SQL SERVER , UML , DESIGN Patterns Interview question book
http://www.geocities.com/dotnetinterviews/

Nov 21 '05 #3

P: n/a
Rob,

Would you not try with a more simpler solution. A thread is not something
that stops direct when you abort it etc.

As well can you tell why you want to use threading (as Robin already asked).
Often we see here that people want to use threading and than the only result
is that the application takes more resources and time.

Language should not be a problem, the most activate persons in this
newsgroup are from German, English, Danish, Spanish and Dutch speaking
countries (I hope I forget nobody) and there are a lot of visitors with
other native languages. While your name sound at least Dutch.

Cor
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.