X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2FCORBAPorts.cxx;h=aeba65639af0882fcff5729ddef54e1032963330;hb=17b2be6fdceef9981751309428fbfe58f155c48e;hp=ee14bd161c9dc31df52ebd6a83d4e89db2a1c26a;hpb=88c5f67088445931a1598331e1faae6df0145c0b;p=modules%2Fyacs.git diff --git a/src/runtime/CORBAPorts.cxx b/src/runtime/CORBAPorts.cxx index ee14bd161..aeba65639 100644 --- a/src/runtime/CORBAPorts.cxx +++ b/src/runtime/CORBAPorts.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2014 CEA/DEN, EDF R&D +// Copyright (C) 2006-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -29,6 +29,7 @@ #include "RuntimeSALOME.hxx" #include "TypeConversions.hxx" #include "TypeCode.hxx" +#include "AutoLocker.hxx" #include "CORBAPorts.hxx" #include "PythonPorts.hxx" #include "ServiceNode.hxx" @@ -165,7 +166,7 @@ void InputCorbaPort::put(CORBA::Any *data) throw (ConversionException) #ifdef REFCNT DEBTRACE("refcount CORBA : " << ((omni::TypeCode_base*)data->pd_tc.in())->pd_ref_count); #endif - YACS::BASES::Lock lock(&_mutex); + YACS::BASES::AutoLocker lock(&_mutex); #ifdef _DEVDEBUG_ display(data); #endif @@ -207,7 +208,7 @@ CORBA::Any * InputCorbaPort::getAny() PyObject * InputCorbaPort::getPyObj() { - YACS::BASES::Lock lock(&_mutex); + YACS::BASES::AutoLocker lock(&_mutex); CORBA::TypeCode_var tc=getAny()->type(); if (!tc->equivalent(CORBA::_tc_null)) return convertCorbaPyObject(edGetType(),getAny()); @@ -318,7 +319,7 @@ void OutputCorbaPort::put(CORBA::Any *data) throw (ConversionException) InputPort *p; { - YACS::BASES::Lock lock(&_mutex); + YACS::BASES::AutoLocker lock(&_mutex); #ifdef REFCNT DEBTRACE("refcount CORBA : " << ((omni::TypeCode_base*)data->pd_tc.in())->pd_ref_count); #endif @@ -422,7 +423,7 @@ CORBA::Any * OutputCorbaPort::getAnyOut() PyObject * OutputCorbaPort::getPyObj() { - YACS::BASES::Lock lock(&_mutex); + YACS::BASES::AutoLocker lock(&_mutex); CORBA::TypeCode_var tc=getAny()->type(); if (!tc->equivalent(CORBA::_tc_null)) return convertCorbaPyObject(edGetType(),getAny());