[omniORB] omniorbpy: switching GC off for duration of every outgoing call

Duncan Grisby duncan at grisby.org
Wed Apr 29 16:53:41 BST 2015


On Fri, 2015-04-17 at 22:07 -0500, Michael Kilburn wrote

> As you see I solved the problem by intercepting and wrapping
> _omnipy.invoke(). Unfortunately in Omni4.x we have:

[...]
>     def myMethod(self, *args):
>         return self._obj.invoke("myMethod", ..., args)
> 
> i.e. there is no single method to intercept for an easy fix. Or better
> to say, I did not find it yet.

Unfortunately, there's no simple pure Python way to do it any more. It
was a side-effect of the previous implementation that you could do it
before.

The only clean way I can think of is to do it in the C++ code that
implements invoke. In fact, since presumably it is the unmarshalling
code that constructs Python objects that benefits from turning off the
GC, you could do it just inside the functions that do that. If you look
in pyCallDescriptor.cc, you'll see methods unmarshalArguments and
unmarshalReturnedValues. You could disable and re-enable the GC in
there.

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --





More information about the omniORB-list mailing list