threads and concurrency performance test receive bunch of messages def consume_test(countch)for in xrange(count)values ch recv(performance test send bunch of messages def produce_test(countvaluesch)for in xrange(count)ch send(valuesif _name_ =' _main_ 'ch floatchannel( multiprocessing process(target=consume_testargs=( ,ch) start(values [float(xfor in xrange( )produce_test( valueschprint("done" join(further study of this example is left to the reader howeverin performance test on the author' machinesending large list of floats through the floatchannel is about percent faster than sending the list through pipe (which has to pickle and unpickle all of the valuesmanaged objects unlike threadsprocesses do not support shared objects although you can create shared values and arrays as shown in the previous sectionthis doesn' work for more advanced python objects such as dictionarieslistsor instances of user-defined classes the multiprocessing module doeshoweverprovide way to work with shared objects if they run under the control of so-called manager manager is separate subprocess where the real objects exist and which operates as server other processes access the shared objects through the use of proxies that operate as clients of the manager server the most straightforward way to work with simple managed objects is to use the manager(function manager(creates running manager server in separate process returns an instance of type syncmanager which is defined in the multiprocessing managers submodule an instance of syncmanager as returned by manager(has series of methods for creating shared objects and returning proxy which can be used to access them normallyyou would create manager and use these methods to create shared objects before launching any new processes the following methods are definedm array(typecodesequencecreates shared array instance on the server and returns proxy to it see the "shared data and synchronizationsection for description of the arguments boundedsemaphore([value]creates shared threading boundedsemaphore instance on the server and returns proxy to it lib fl ff