Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
Generalreferencing dlls with same name. Pin
D2raghu19-Feb-08 17:08
D2raghu19-Feb-08 17:08 
GeneralRe: referencing dlls with same name. Pin
Hamza Nadim20-Feb-08 5:00
Hamza Nadim20-Feb-08 5:00 
GeneralGAC related question Pin
Imtiaz Murtaza19-Feb-08 13:24
Imtiaz Murtaza19-Feb-08 13:24 
GeneralRe: GAC related question Pin
Luc Pattyn19-Feb-08 13:56
sitebuilderLuc Pattyn19-Feb-08 13:56 
GeneralRe: GAC related question Pin
PIEBALDconsult19-Feb-08 14:04
mvePIEBALDconsult19-Feb-08 14:04 
QuestionThread instance object location Pin
Spacix One19-Feb-08 13:01
Spacix One19-Feb-08 13:01 
GeneralRe: Thread instance object location Pin
Luc Pattyn19-Feb-08 14:25
sitebuilderLuc Pattyn19-Feb-08 14:25 
GeneralRe: Thread instance object location Pin
Spacix One19-Feb-08 17:08
Spacix One19-Feb-08 17:08 
Thanks for the comments and input.

Responses:
1. & 2.
Comments based off the simplified example code. Sorry if I wasted your time analizing the code rather than the "general" design.

3.
timing doesn't matter, just a delay to prevent 100% CPU / thread lock if for some unknown reason the thread doesn't start right away. Which would be a case 1 out of 1000000 or more... I just need to know if it is active and running before I start up the form else trouble might start brewing

4.
You seem to have come to the same conclusion I did but with minor differences

  A. I'm not passing the thread to the form but storing it's class instance in a property, which is diffrent / unheard of to me.

  B. I'm more worried about what happens if form get thrown to the GC before the thread finishes, because the class instance will stay with all data intact until the GC junks it.

I've used setup properties before, which is why I thought of this. I do think this is better than running a method to get the device handles, save them to a public static ArrayList (yuck!), start the form, via onload event start processing the devices based off the public static ArrayList in a new timer thread, and then onclosing event to close the devices handles and wait for the last timer thread to die.

5.
see 1. & 2.

6.
Considering that the thread is holding handles to USB devices, I can't make it in the background. If the thread can't finish and exit within 3 seconds (~16-18 loops in the thread) after calling join() and setting the exit flag. Then it is soft locked and wouldn't matter if I killed it. Since the app is closing anyway it's ok to just junk it and the USB port handle will timeout at ~750ms via my driver. The problem here is it's better to allow the thread to finish for it might be witting to e2 on the device. Which is bad if you save to the the device and close the form before it is 100% written.


-Spacix
All your skynet questions[^] belong to solved

GeneralRe: Thread instance object location Pin
Luc Pattyn20-Feb-08 4:07
sitebuilderLuc Pattyn20-Feb-08 4:07 
GeneralReflectively setting properties on value types Pin
Skippums19-Feb-08 12:06
Skippums19-Feb-08 12:06 
AnswerRe: Reflectively setting properties on value types Pin
Skippums19-Feb-08 12:25
Skippums19-Feb-08 12:25 
GeneralRe: Reflectively setting properties on value types Pin
PIEBALDconsult19-Feb-08 13:13
mvePIEBALDconsult19-Feb-08 13:13 
GeneralRe: Reflectively setting properties on value types Pin
PIEBALDconsult19-Feb-08 13:06
mvePIEBALDconsult19-Feb-08 13:06 
GeneralRe: Reflectively setting properties on value types Pin
Skippums20-Feb-08 6:46
Skippums20-Feb-08 6:46 
Questionp-port output problem Pin
Gunnar575919-Feb-08 11:25
Gunnar575919-Feb-08 11:25 
GeneralRe: p-port output problem Pin
Christian Graus19-Feb-08 12:32
protectorChristian Graus19-Feb-08 12:32 
QuestionData table in C# Pin
dalbhide bipin19-Feb-08 11:12
dalbhide bipin19-Feb-08 11:12 
GeneralRe: Data table in C# Pin
Gareth H19-Feb-08 11:35
Gareth H19-Feb-08 11:35 
GeneralRe: Data table in C# Pin
dalbhide bipin19-Feb-08 18:47
dalbhide bipin19-Feb-08 18:47 
GeneralArray null problem Pin
netJP12L19-Feb-08 10:58
netJP12L19-Feb-08 10:58 
GeneralRe: Array null problem Pin
Ravi Bhavnani19-Feb-08 11:03
professionalRavi Bhavnani19-Feb-08 11:03 
GeneralRe: Array null problem Pin
TheGreatAndPowerfulOz20-Feb-08 13:32
TheGreatAndPowerfulOz20-Feb-08 13:32 
Questionhow to create web site blocker Pin
Mahmood Abbasi19-Feb-08 10:06
Mahmood Abbasi19-Feb-08 10:06 
AnswerRe: how to create web site blocker Pin
Ravi Bhavnani19-Feb-08 10:45
professionalRavi Bhavnani19-Feb-08 10:45 
AnswerRe: how to create web site blocker Pin
Pete O'Hanlon19-Feb-08 10:47
mvePete O'Hanlon19-Feb-08 10:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.