Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Refer to the System.Threading namespace on MSDN for full details. Meanwhile here is a quick taste.
using System;
using System.Threading;
class ThreadTest
{
public void Runme()
{
Console.WriteLine("Runme Called");
Thread.Sleep(10000);
}
public static void Main(String[] args)
{
ThreadTest b = new ThreadTest();
Thread t = new Thread(new ThreadStart(b.Runme));
t.Start();
Console.WriteLine("Thread 't' started.");
Console.WriteLine("There is no telling when " +
"'Runme' will be invoked. ");
t.Join();
Console.WriteLine("Thread 't' has ended.");
}
}
[Author: Santosh Zachariah]
Comments
- Anonymous
March 15, 2004
The comment has been removed - Anonymous
March 16, 2004
Maybe the answer shold have been "because there is no such thing as simple threading". Every example of real world usage carries with it a massive amount of extra complexity. In many ways, giving simple examples gives the impression that threading can be simple - and in my experience that simply isn't true. - Anonymous
March 16, 2004
I did a presentation on this a few weeks ago which most people seemed to understand. It covers several models for mutlithreaded programming.
The blog post it at <http://e-oddie.com/blog/professional/archive/2004/03/10/221.aspx>.
The powerpoint and code can be downloaded from <http://www.e-oddie.com/downloads/professional/Feb04%20NetUG%20Presentation.zip>. - Anonymous
March 16, 2004
Lets try again on those URLs... The blog is at:
http://e-oddie.com/blog/professional/archive/2004/03/10/221.aspx
And the download is at:
http://www.e-oddie.com/downloads/professional/Feb04%20NetUG%20Presentation.zip - Anonymous
May 08, 2004
Where can I find sample C# code for simple threading? - Anonymous
June 25, 2004
The comment has been removed - Anonymous
June 27, 2004
http://www.favourite-links.com
http://www.links4you.biz - Anonymous
July 17, 2004
my web:
http://www.sj55.com/pic_sort http://www.zw88.com/paopaotang.htm http://www.zw88.com/sj.htm http://www.zw88.com/sm/
http://www.zw88.com/sms/ http://www.zw88.com/zw.htm http://www.resou.com/8888.htm http://www.sj55.com/pic/pic_1130.htm - Anonymous
July 25, 2004
dianying xia zai:http://www.kamun.com/
movie down:http://movie.kamun.com/
mp3 xia zai:http://music.kamun.com/
engage:http://club.kamun.com/ - Anonymous
December 27, 2004
[http://itpeixun.51.net/][http://aissl.51.net/][http://kukuxz003.freewebpage.org/][http://kukuxz001.51.net/][http://kukuxz003.51.net/][http://kukuxz005.51.net/][http://kukuxz002.51.net/][http://kukuxz004.freewebpage.org/][http://kukuxz007.51.net/][http://kukuxz001.freewebpage.org/][http://kukuxz006.51.net/][http://kukuxz002.freewebpage.org/][http://kukuxz004.51.net/][http://kukuxz008.51.net/][http://kukuxz009.51.net/][http://kukuxz005.freewebpage.org/][http://kukuxz006.freewebpage.org/][http://kukuxz007.freewebpage.org/][http://kukuxz009.freewebpage.org/] - Anonymous
June 09, 2009
PingBack from http://insomniacuresite.info/story.php?id=10124