473,320 Members | 1,853 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,320 software developers and data experts.

when a thread finishes, it fires any event?

when a thread finishes, it fires any event? How to get this event?

thanks in advance.
Nov 16 '05 #1
3 3072
Hi,

"Wrathchild" <wr********@maidenfans.com> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...
when a thread finishes, it fires any event?
No it doesn't.
How to get this event?


Have the code executing on the thread execute a callback when execution
finishes (event). Or you could use an .NET Event class (eg ManualResetEvent)
and set it to signaled when the thread finishes.

HTH
---
Tom Tempelaere
Nov 16 '05 #2
IIRC, you can catch an abort event around any blocking operation (i.e. wait,
lock, etc) But no event when you just return from your method unless you
signal one yourself. You could use a .net event object for this and have
your control thread wait on this (or other) events.

--
William Stacey, MVP

"Wrathchild" <wr********@maidenfans.com> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...
when a thread finishes, it fires any event? How to get this event?

thanks in advance.


Nov 16 '05 #3
> when a thread finishes, it fires any event? How to get this event?

You could manually fire an event at the exit of your thread method.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Stirling | last post by:
I have a main worker thread that spawns a child thread to do some listening. What I would like to have happen is to have the child thread raise events in the parent thread, and have the parent...
6
by: Ana | last post by:
Hi! I have problems with the following scenario: My application is developed using C# under .NET. It must run on all Windows versions starting from Windows 98. The user must open different...
3
by: NWeller | last post by:
Well, I think it is odd. I have written an application that fires off requests at a COM component written in VB6. I am creating multiple threads, one for each test. I know that the...
3
by: cider123 | last post by:
I have a simple Window Service that loads up a list of Folders to monitor, along with parameters for a maintenance profile. Every time the interval is reached, the Window Service spawns off a...
1
by: Tom | last post by:
First of all, is it 'legal' (i.e. thread-safe) to pass events back from a worker thread to the main thread? I.E. Can one put PUBLIC EVENT XYZ in their worker thread and then raise that event for...
6
by: JohnR | last post by:
I'm running into a 'timing' or 'race' condition on my form. All textbox controls are bound to a datasource, but certain other controls (like labels) need to be updated when you move to a...
11
by: HairlipDog58 | last post by:
Hello, There are several 'cross-thread operation not valid' exception postings in the MSDN discussion groups, but none address my exact situation. I have authored a .NET component in Visual C#...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
3
by: Jack | last post by:
Hi, I'm writing a simple wav player (like winamp) and using the SoundPlayer class in c# 2005. Using winform buttons, I can begin playing the sound and stop half-way through the sound using:...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.