Click here to Skip to main content
15,922,155 members
Home / Discussions / C#
   

C#

 
GeneralRe: Directx Writepixel in .NET Pin
Jeremy Kimball15-Jun-04 3:00
Jeremy Kimball15-Jun-04 3:00 
GeneralSynchronized Databinding Pin
WillemM14-Jun-04 6:43
WillemM14-Jun-04 6:43 
GeneralRe: Synchronized Databinding Pin
WillemM14-Jun-04 7:51
WillemM14-Jun-04 7:51 
GeneralDataGrid CheckBoxes Pin
exhaulted14-Jun-04 6:23
exhaulted14-Jun-04 6:23 
GeneralRe: DataGrid CheckBoxes Pin
Heath Stewart14-Jun-04 6:28
protectorHeath Stewart14-Jun-04 6:28 
GeneralRe: DataGrid CheckBoxes Pin
exhaulted14-Jun-04 22:09
exhaulted14-Jun-04 22:09 
GeneralRe: DataGrid CheckBoxes Pin
Heath Stewart15-Jun-04 2:32
protectorHeath Stewart15-Jun-04 2:32 
GeneralRe: DataGrid CheckBoxes Pin
exhaulted15-Jun-04 5:40
exhaulted15-Jun-04 5:40 
GeneralRe: DataGrid CheckBoxes Pin
Heath Stewart15-Jun-04 5:53
protectorHeath Stewart15-Jun-04 5:53 
GeneralRe: DataGrid CheckBoxes Pin
exhaulted15-Jun-04 6:17
exhaulted15-Jun-04 6:17 
GeneralDataGrid CheckBoxes Pin
exhaulted14-Jun-04 6:23
exhaulted14-Jun-04 6:23 
Questionthe best way to terminate a blocked thread? Pin
vista2714-Jun-04 6:20
vista2714-Jun-04 6:20 
AnswerRe: the best way to terminate a blocked thread? Pin
palbano14-Jun-04 6:38
palbano14-Jun-04 6:38 
AnswerRe: the best way to terminate a blocked thread? Pin
Mike Dimmick14-Jun-04 6:40
Mike Dimmick14-Jun-04 6:40 
Generalneed help, treeView and active directory Pin
vcorn14-Jun-04 6:11
vcorn14-Jun-04 6:11 
GeneralRe: need help, treeView and active directory Pin
Heath Stewart14-Jun-04 6:41
protectorHeath Stewart14-Jun-04 6:41 
GeneralRe: need help, treeView and active directory Pin
vcorn14-Jun-04 7:29
vcorn14-Jun-04 7:29 
GeneralRe: need help, treeView and active directory Pin
Dave Kreskowiak14-Jun-04 7:31
mveDave Kreskowiak14-Jun-04 7:31 
GeneralRe: need help, treeView and active directory Pin
vcorn14-Jun-04 7:43
vcorn14-Jun-04 7:43 
GeneralRe: need help, treeView and active directory Pin
Wackatronic14-Jun-04 7:57
Wackatronic14-Jun-04 7:57 
GeneralRe: need help, treeView and active directory Pin
Dave Kreskowiak14-Jun-04 8:02
mveDave Kreskowiak14-Jun-04 8:02 
GeneralRe: need help, treeView and active directory Pin
vcorn14-Jun-04 8:27
vcorn14-Jun-04 8:27 
GeneralRe: need help, treeView and active directory Pin
Dave Kreskowiak14-Jun-04 8:34
mveDave Kreskowiak14-Jun-04 8:34 
GeneralUnloading AppDomain Pin
Ami Bar14-Jun-04 5:50
Ami Bar14-Jun-04 5:50 
Hi,

I am writing a project that runs code from several assemblies.
Each assembly should be isolated, and the project supposes to be lightweight, therefore I am running one process and each assembly runs in a different AppDomain.

The project suppose that an assembly may crash or stack and uses the AppDomain.Unload() method to remove an AppDomain to release its resources.

I got to a problem once I tried to unload an AppDomain while a thread, that belonged to it, was waiting on a MessageQueue.Receive(). The AppDomain threw the CannotUnloadAppDomainException exception and didn't unload, or at least not gracefully.

The problem happens when a thread waits on a message queue and cannot be aborted, interrupted, or terminated forcefully. I didn’t try it, but I believe that the same happens when the thread waits for other things that use internally unmanaged code such as sockets.

How can I unload these AppDomains?
How can I force a thread to exit code that suppose to be managed such as MessageQueue.Receive() and Socket.Receive()?


Thanks,
Ami

GeneralRe: Unloading AppDomain Pin
Heath Stewart14-Jun-04 6:43
protectorHeath Stewart14-Jun-04 6:43 

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.