has no effect on the original the pickleability constraints for process arguments on windows can limit multiprocessing' scope in other contexts as well for instancein we'll find that this module doesn' directly solve the lack of portability for the os fork call for traditionally coded socket servers on windowsbecause connected sockets are not pickled correctly when passed into new process created by this module to converse with client in this contextthreads provide more portable and likely more efficient solution applications that pass simpler types of messagesof coursemay fare better message constraints are easier to accommodate when they are part of an initial process-based design moreoverother tools in this modulesuch as its managers and shared memory apiwhile narrowly focused and not as general as shared thread stateoffer additional mutable state options for some programs fundamentallythoughbecause multiprocessing is based on separate processesit may be best geared for tasks which are relatively independentdo not share mutable object state freelyand can make do with the message passing and shared memory tools provided by this module this includes many applicationsbut this module is not necessarily direct replacement for every threaded programand it is not an alternative to process forks in all contexts to truly understand both this module package' benefitsas well as its tradeoffslet' turn to first example and explore this package' implementation along the way the basicsprocesses and locks we don' have space to do full justice to this sophisticated module in this booksee its coverage in the python library manual for the full story but as brief introductionby design most of this module' interfaces mirror the threading and queue modules we've already metso they should already seem familiar for examplethe multiprocessing module' process class is intended to mimic the threading module' thread class we met earlier--it allows us to launch function call in parallel with the calling scriptwith this modulethoughthe function runs in process instead of thread example - illustrates these basics in actionexample - pp \system\processes\multi py ""multiprocess basicsprocess works like threading threadbut runs function call in parallel in process instead of threadlocks can be used to synchronizee prints on some platformsstarts new interpreter on windowsforks new process on unix""import os from multiprocessing import processlock the multiprocessing module