More about application domain

T

Tony Johansson

Hi!

If I want to have 5 application domain and in each one have the assembly
test1.exe and test2.exe be executing.
the only way to do this is to have 5*2 = 10 threads be running. This must be
correct ?

Now to one more question when you run two assemblies test1.exe and
test2.exe in th esame application domain these two might interfere with each
other resources because they might share some resources. So here we might
have to use some kind of synchronization to shared resources. This must also
be correct ?.

You don't have to worry about synchronization when you run exe file in two
different application domain because these are isolated from each other.

Give me a comment about this !

//Tony
 
A

Arne Vajhøj

If I want to have 5 application domain and in each one have the assembly
test1.exe and test2.exe be executing.
the only way to do this is to have 5*2 = 10 threads be running. This must be
correct ?

No.

Threads and app domains are orthogonal.
Now to one more question when you run two assemblies test1.exe and
test2.exe in th esame application domain these two might interfere with each
other resources because they might share some resources. So here we might
have to use some kind of synchronization to shared resources. This must also
be correct ?.

Because each app domain will have its own copy of the resource, then
there are less reason for synchronization.

But the same could have been accomplished just by having two
instances in the same app domain.
You don't have to worry about synchronization when you run exe file in two
different application domain because these are isolated from each other.

I think you can still need synchronization semaphore style with
multiple app domains.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top