hello all!
Does creating a new AppDomain, automatically start a new thread?
No.
now, im thinking of allowing a plugin to run on its own thread and/or its
own domain (w/c basically complicates my life more).
Well, running each plugin in a different AppDomain has its advantages,
yeah, kinda considered appdomains, for isolation of the plugins. because in
the type of plugins i have, there's a big chance that one plugin might hang
or breakdown.. and thru appdomains i could prevent the rest of the plugins
(the ones that are still ok) from joining in the 'headache'. right?
>If you want to run each plugin in a different thread (and without
knowing the details of what the plugins do...
that's basically it: my host program (main window and all) will load some
plugins. and thru a plugin interface it only knows two functions - Start()
and Stop(). my host program doesnt know what the plugins do, it just calls
the start and stop functions.
Normally, the Start() function in a plugin, contains showing of a window.
So, in a non-'multithreaded' system, i would just invoke the Start for each
plugin. On the other hand, for multithreaded system, i would be invoking the
Start() inside a new thread. Sounds really, simple.. but is this correct?
What are the things that i should worry about? - i.e. about the marshalling
of data, im still researching about it.
also in my plugin system, i have an "event engine" wherein plugins can:
register new events, subscribe to a registered event, and trigger a
registered event. this event engine will be my communications for
host-plugins and plugin-to-plugins. since, the plugins might be on a separate
thread or domain, i know i need to worry about marshalling again (for the
event arguments). Could you give me some idea on how to go about this, or at
least a good reference, particularly about events across multple threads?
Please :)
thanks for the replies! ..i really appreciate it.
--
It is only through the heart that one can see rightly. (The Little Prince)
MickeyMicks