473,326 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How can I implement multi thread?? Help me

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
2 1816
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: OutsiderJustice | last post by:
Hi All, I can not find any information if PHP support multi-thread (Posix thread) or not at all, can someone give out some information? Is it supported? If yes, where's the info? If no, is it...
0
by: Atul Kshirsagar | last post by:
I am embedding python in my C++ application. I am using Python *2.3.2* with a C++ extention DLL in multi-threaded environment. I am using SWIG-1.3.19 to generate C++ to Python interface. Now to...
77
by: Jon Skeet [C# MVP] | last post by:
Please excuse the cross-post - I'm pretty sure I've had interest in the article on all the groups this is posted to. I've finally managed to finish my article on multi-threading - at least for...
3
by: Amit Dedhia | last post by:
Hi I am developing a Dot net application (involving image processing) on a uni processor. It works well on my machine. I then take all my code on a multi processor, build and run the application...
5
by: Rob Durant | last post by:
Hi, I have a multi-threaded application (have also tried as service - same behaviour) that runs fine on XP, but not on 2003. Symptoms are: Threads are started normally, locks acquired and...
3
by: Joe Befumo | last post by:
This is my first attempt at multi-thread programming, and I'm encountering a program-logic problem that I can't quite put my finger on. The program is pretty simple. I'm trying to validate a...
5
by: George Maicovschi | last post by:
As multi-threading is not built in PHP I've been using a hack letting the Apache server handle the multi-threading issues, but I'm really curious of other approaches to this issue. If anyone has...
4
by: liu yang | last post by:
I want to build a timer for each thread, and the timer must be thread- safe. How to do that? My environment is Linux and Pthread. Thanks.
14
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
As far as I know, the C Standard has no mention of multi-threaded programming; it has no mention of how to achieve multi-threaded programming, nor does it mention whether the language or its...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.