How can I implement multi thread?? Help me

  • Thread starter Thread starter qushui_chen
  • Start date Start date
Q

qushui_chen

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
 
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/quickstart/howto/doc/WinForms/WinFormsThreadMar
shalling.aspx

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
Back
Top