|
-
May 13th, 2012, 05:12 PM
#16
Re: Different option for Thread.Sleep?
I don't have access and I'm not willing to sign up.
Can you SIMPLY attach the zipped file in your reply (use the Manage Attachments button)?
-
May 13th, 2012, 06:04 PM
#17
Re: Different option for Thread.Sleep?
 Originally Posted by Arjay
I don't have access and I'm not willing to sign up.
Can you SIMPLY attach the zipped file in your reply (use the Manage Attachments button)?
Wvs.zip
Here you go, I really appreciate the help.
-
May 13th, 2012, 07:15 PM
#18
Re: Different option for Thread.Sleep?
Modify the Code class...
Code:
class Data
{
public void Restart()
{
ThreadPool.QueueUserWorkItem(DoWork);
}
private void DoWork(object dataState)
{
Thread.Sleep(3000);
Console.WriteLine("Started!");
}
}
This will delay the Restart operation without blocking the main thread. Of course it probably doesn't do what you really need it to do.
If not, then repost a more complete zipped solution where the sample code shows code that is a bit closer to what you really need.
-
May 13th, 2012, 10:22 PM
#19
Re: Different option for Thread.Sleep?
 Originally Posted by Arjay
Modify the Code class...
Code:
class Data
{
public void Restart()
{
ThreadPool.QueueUserWorkItem(DoWork);
}
private void DoWork(object dataState)
{
Thread.Sleep(3000);
Console.WriteLine("Started!");
}
}
This will delay the Restart operation without blocking the main thread. Of course it probably doesn't do what you really need it to do.
If not, then repost a more complete zipped solution where the sample code shows code that is a bit closer to what you really need.
Thanks! that worked just fine!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|