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

How can I implement multi thread?? Help me

P: n/a
Now i was writing a programe,profile as
first==>search data from SqlServer====>send mail to User==>write to log

How can i do to implement the multi-thread? thank
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Implementing multiple threads is not as straight forward... But let me try
to explain it to you!

You need to create a new (worker) thread, and start that worker thread, so
the main (UI) thread can continue. If the worker thread has finished, it
needs to do a callback to your main thread (probably marshal some data too)
so you can send your email.

Here is an example how you can implement it:
http://samples.gotdotnet.com/quickst...FormsThreadMar
shalling.aspx

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
"qushui_chen" <qu*********@asus.com.cn> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl...
Now i was writing a programe,profile as
first==>search data from SqlServer====>send mail to User==>write to log

How can i do to implement the multi-thread? thank

Nov 15 '05 #2

P: n/a

http://msdn.microsoft.com/msdnmag/is...g/default.aspx

plus its follow up articles.

Hope that helps. Certainly helped me last week sort it all out.

"qushui_chen" <qu*********@asus.com.cn> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl...
Now i was writing a programe,profile as
first==>search data from SqlServer====>send mail to User==>write to log

How can i do to implement the multi-thread? thank

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.