G
Guest
I have an application where I'd like to be able to run multiple instances of
a Windows forms application. Due to a heavy hit in our application startup
code it would be beneficial to be able to have a single process with multiple
instances of the form. Additionally, it would be useful to be able to
partition off each instance in it's own application domain. The current plan
is for a module to handle starting a new thread which will fire up a new app
domain and then load the form. This module will also handle firing up any new
instances by creating a new thread and application domain.
My concern is any issues surrounding the UI thread. I'm aware that only the
thread that calls Application.Run should access any of the UI components.
Typically you would only have one per process. In my situation I'll end up
with multiple UI threads. However, each application domain will only have a
single UI thread and only this thread will access any UI components.
Is the application domain enough of a boundary for the UI threads or am I
setting myself up for threading issues?
a Windows forms application. Due to a heavy hit in our application startup
code it would be beneficial to be able to have a single process with multiple
instances of the form. Additionally, it would be useful to be able to
partition off each instance in it's own application domain. The current plan
is for a module to handle starting a new thread which will fire up a new app
domain and then load the form. This module will also handle firing up any new
instances by creating a new thread and application domain.
My concern is any issues surrounding the UI thread. I'm aware that only the
thread that calls Application.Run should access any of the UI components.
Typically you would only have one per process. In my situation I'll end up
with multiple UI threads. However, each application domain will only have a
single UI thread and only this thread will access any UI components.
Is the application domain enough of a boundary for the UI threads or am I
setting myself up for threading issues?