All,
I have an application that spawns several worker threads (using
asynchronous callbacks with Begin/EndInvoke) that make calls to the
WMI using the System.Management namespace.
Since the Management classes are largely a wrapper around COM objects,
I'm wondering what thread blocking issues I might run into when my
worker thread executes a method such ManagementClass.GetInstances().
For example, let's say my worker thread makes a call to GetInstances,
and there are currently 0 available threads in the ThreadPool. Does
the call to GetInstances attempt to use the current thread, or will it
spawn a new thread? If it spawns a new thread, does the CLR attempt to
create a new thread from the Thread Pool?
Currently, my application runs just fine and I don't have any blocking
issues, but I was reviewing my code and I began to wonder if I might
start seeing problems down the road.
Thanks for any info!
Mark