Click here to Skip to main content
15,887,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Trying to design something like ASP.NET, but need further understanding as to how to go about programming/designing it.

There would be a lot of unmanaged threads which needs to be served by a managed process (DLL). I know just one way to do this:

  1. host the CLR from the unmanaged thread (using COM interfaces)
  2. Create the AppDomain and load the required assembly
  3. Call the method in the managed assembly to do the serving (this method updates a data structure which contains data will need to get further processed by the unmanaged thread)
  4. unload the appdomain and clr

But is this way recommended? Because each time you are creating the CLR and destroying it. I sense there must be a performance hit there. Can we obviate this?
Posted
Updated 11-Feb-10 7:02am
v2

1 solution

deostroll wrote:
Can we obviate this?


Use C++/CLI for the interface between unmanged-to-managed code. Then no need to create the CLR and AppDomain.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900