Free-threading, COM and Multiple CPU's

Mark Hammond mhammond at
Sun Mar 23 02:49:49 CET 2003

Engel, Gregory wrote:
> At the very end of Mark Hammond and Andy Robinson's excellent book,


> "Python Programming on Win32" they provide example code for creating
> free-threaded objects, demonstrating that COM spins up a new thread
> to host objects created by a main thread.  My question is, under
> these conditions would the free-threaded COM objects utilize the
> resources of multiple CPU's?  Unfortunately, I am not developing on a
> multiple CPU box yet may be required to deploy on a multiple CPU box.

In general, no.  Only one processor can ever be executing in the Python 
VM at a time.  But if the COM objects you use are implemented in *say) 
C++ and Python is only driving them, then although Python will not 
execute on both at once, the objects themselves might.  Of course, if 
you are talking about implementing these objects in Python, we are back 
in the same boat.

It may be possible for you to use RemoteServer COM objects, thereby 
having each object in its own process, and this would execute concurrently.


More information about the Python-list mailing list