473,498 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

thread suspend resume obsolete

I'm using Microsoft Visual Studio 2005

in multithreading, I want to be able to pause and resume a thread. I
see that suspend and resume are deprecated. So what can I use instead.

Feb 17 '07 #1
4 3164


"wanwan" <er*******@yahoo.comwrote in message
news:11*********************@v33g2000cwv.googlegro ups.com...
I'm using Microsoft Visual Studio 2005

in multithreading, I want to be able to pause and resume a thread. I
see that suspend and resume are deprecated. So what can I use instead.
From the thread, wait using an Event.

David

Feb 17 '07 #2
wanwan,

You can also use the Thread.Sleep method

Bruce

"wanwan" <er*******@yahoo.comwrote in message
news:11*********************@v33g2000cwv.googlegro ups.com...
I'm using Microsoft Visual Studio 2005

in multithreading, I want to be able to pause and resume a thread. I
see that suspend and resume are deprecated. So what can I use instead.

Feb 17 '07 #3
Wanwan,
Have a look at the following articles:

http://groups.google.com/group/micro...1896dfab2ed841

http://groups.google.com/group/micro...k+to+Search&&d
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"wanwan" <er*******@yahoo.comwrote in message
news:11*********************@v33g2000cwv.googlegro ups.com...
I'm using Microsoft Visual Studio 2005

in multithreading, I want to be able to pause and resume a thread. I
see that suspend and resume are deprecated. So what can I use instead.
Feb 26 '07 #4
"David Browne" <davidbaxterbrowne no potted me**@hotmail.comwrote in
news:e$**************@TK2MSFTNGP06.phx.gbl:
"wanwan" <er*******@yahoo.comwrote in message
news:11*********************@v33g2000cwv.googlegro ups.com...
>I'm using Microsoft Visual Studio 2005

in multithreading, I want to be able to pause and resume a thread. I
see that suspend and resume are deprecated. So what can I use instead.

From the thread, wait using an Event.
Or you can use ManualResetEvents/AutoResetEvents. Those are pretty neat
too.
Feb 26 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1633
by: Paul Tomlinson | last post by:
Quick question. If i call Thread.suspend() on a thread does the thread which is being suspended get any notification that it has been/is being suspended? I am thinking i want the...
2
2288
by: Sakharam Phapale | last post by:
Hi All, In following example, while playing file, if thread goes in WaitSleepJoin state, due to Thread.Sleep method. Now I want to suspend thread by clicking on cmdSuspend button. I have...
7
2668
by: Charles Law | last post by:
My first thought was to call WorkerThread.Suspend but the help cautions against this (for good reason) because the caller has no control over where the thread actually stops, and it might have...
1
2984
by: alundi | last post by:
Greetings: I'd like to post this as a new thread to an article in microsoft.public.dotnet.languages.vb originally made by nevin and replied to by Alan Pretre back in December ("ThreadState ==...
17
5635
by: Benny Raymond | last post by:
I have a thread that sleeps for 5 minutes once it's finished running a method and then it repeats itself if it's supposed to (bool = true). Prior to 2.0 I was able to resume the thread after...
12
31852
by: Andrew Bullock | last post by:
Hi, I'm using a second thread within my program to do some long calculations, without locking up the UI: worker = new Thread(new ThreadStart(myClass.Run)); worker.Start(); I want to be...
6
10245
by: Buddy Home | last post by:
Hello, I want to understand whats the best way to write code to replace Thread.Suspend, Thread.Resume and Thread.Abort. I have lots of code calling these existing methods and want to minimize...
3
6025
by: =?Utf-8?B?TWFyayBDaGFubmluZw==?= | last post by:
I have a code which registers all threads with a thread dump class. At intervals this thread dump class will dump the stack trace of all threads. As calling StackTrace(threadtoDump) from a...
20
5512
by: cty0000 | last post by:
I have some question.. This is my first time to use thread.. Following code does not have error but two warring The warring is Warning 2 'System.Threading.Thread.Suspend()' is obsolete:...
0
7121
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.