In this case, are you printing into a maya gui?
Perhaps, you need to try pushing the print to the main thread, so you
don't step on Maya's event loop.
import maya.utils
import maya.cmds
def doSphere( radius ):
maya.cmds.sphere( radius=radius )
maya.utils.executeInMainThreadWithResult( doSphere, 5.0 )
On Wed, Jun 9, 2010 at 9:48 PM, Paul Molodowitch <[email protected]> wrote:
> So, given the issues with the GIL lock in python, I was excited about
> using the new multiprocessing module... especially since a back port
> is also available for python 2.5.
>
> I worked beautifully when I was playing around with it from mayapy -
> but as soon as I tried to use it in a GUI maya, maya crashed
> immediately.
>
> For the curious, here's what I was testing with:
>
> import multiprocessing
> from pprint import pprint
>
> p = multiprocessing.Process(target=pprint, args=(dir,))
> p.start()
> p.join()
>
> Does anyone know if I'm doing anything wrong here? As I said, it seems
> to work fine when done from a console. Or does maya just not like
> multiprocessing? I know that it can have some issues with threads...
> but given that things such as subprocess seem to work fine, I had hope
> for multiprocessing...
>
> - Paul
>
> --
> http://groups.google.com/group/python_inside_maya
--
http://groups.google.com/group/python_inside_maya