Click here to Skip to main content
15,905,963 members
Home / Discussions / C#
   

C#

 
AnswerRepeat Pin
Not Active31-Mar-11 2:33
mentorNot Active31-Mar-11 2:33 
QuestionAppdomain [modified] Pin
abcurl31-Mar-11 0:35
abcurl31-Mar-11 0:35 
AnswerRe: Appdomain Pin
Rob Philpott31-Mar-11 1:31
Rob Philpott31-Mar-11 1:31 
QuestionProtecting from plugin crashes Pin
Benny_Lava30-Mar-11 22:37
Benny_Lava30-Mar-11 22:37 
AnswerRe: Protecting from plugin crashes Pin
BobJanova30-Mar-11 23:18
BobJanova30-Mar-11 23:18 
GeneralRe: Protecting from plugin crashes Pin
Benny_Lava31-Mar-11 1:13
Benny_Lava31-Mar-11 1:13 
AnswerRe: Protecting from plugin crashes Pin
Rob Philpott31-Mar-11 1:34
Rob Philpott31-Mar-11 1:34 
QuestionBlocking threads - growing memory Pin
GDavy30-Mar-11 20:48
GDavy30-Mar-11 20:48 
Hello,

I have an annoying issue where I could use some advice.
I created a small windows service which uses at standard time-intervals different COM components.
Every time the COM components are instantiated in their own thread, the required methods are invoked and the COM components are subsequently released and their threads end, the main thread can then evaluate the result of each COM component's action.
For some COM components(third party) a problem occurs from time to time and the instantiation of the COM object blocks the thread. Even calling an Abort on these threads is not possible because doing that causes the main-thread to block.
The COM components are simply instantiated using:
<br />
System.Activator.CreateInstance(comType); //here it blocks when it goes wrong (not always)<br />

The comType is gotten using:
<br />
Type comType = Type.GetTypeFromProgID(sComName); //sComName is the name of the COM component<br />


If this blocking happens frequently, the memory of the process increases steadily due to all the blocked threads that I can't stop.
So what I need is an ability to use the COM components, and still be able to clean up the threads in case such a block occurs. Does anyone have any ideas how I could accomplish that?

Regards,
Davy
AnswerRe: Blocking threads - growing memory Pin
Eddy Vluggen31-Mar-11 0:38
professionalEddy Vluggen31-Mar-11 0:38 
QuestionCast Action<T> to Action<object> [modified] Pin
Adriaan Davel30-Mar-11 20:36
Adriaan Davel30-Mar-11 20:36 
AnswerRe: Cast Action to Action Pin
Groulien30-Mar-11 22:01
Groulien30-Mar-11 22:01 
GeneralRe: Cast Action to Action Pin
Adriaan Davel30-Mar-11 22:37
Adriaan Davel30-Mar-11 22:37 
AnswerRe: Cast Action to Action Pin
Eddy Vluggen30-Mar-11 22:06
professionalEddy Vluggen30-Mar-11 22:06 
GeneralRe: Cast Action to Action Pin
Adriaan Davel30-Mar-11 22:32
Adriaan Davel30-Mar-11 22:32 
GeneralRe: Cast Action to Action Pin
Wayne Gaylard30-Mar-11 22:37
professionalWayne Gaylard30-Mar-11 22:37 
GeneralRe: Cast Action to Action Pin
Eddy Vluggen30-Mar-11 22:44
professionalEddy Vluggen30-Mar-11 22:44 
GeneralRe: Cast Action to Action Pin
Adriaan Davel30-Mar-11 22:49
Adriaan Davel30-Mar-11 22:49 
GeneralRe: Cast Action to Action Pin
Eddy Vluggen30-Mar-11 22:55
professionalEddy Vluggen30-Mar-11 22:55 
GeneralRe: Cast Action to Action Pin
Adriaan Davel30-Mar-11 23:02
Adriaan Davel30-Mar-11 23:02 
GeneralRe: Cast Action to Action Pin
Eddy Vluggen30-Mar-11 23:19
professionalEddy Vluggen30-Mar-11 23:19 
GeneralRe: Cast Action to Action Pin
PIEBALDconsult31-Mar-11 2:57
mvePIEBALDconsult31-Mar-11 2:57 
GeneralRe: Cast Action to Action Pin
Eddy Vluggen31-Mar-11 3:05
professionalEddy Vluggen31-Mar-11 3:05 
GeneralRe: Cast Action to Action Pin
J4amieC31-Mar-11 3:38
J4amieC31-Mar-11 3:38 
GeneralRe: Cast Action to Action Pin
Eddy Vluggen31-Mar-11 3:45
professionalEddy Vluggen31-Mar-11 3:45 
GeneralRe: Cast Action to Action Pin
J4amieC31-Mar-11 5:46
J4amieC31-Mar-11 5:46 

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.