}
}
-void DataScopeServerTransaction::notifyKey(PyObject *keyObj, PyObject *valueObj)
+void DataScopeServerTransaction::notifyKey(const std::string& varName, PyObject *keyObj, PyObject *valueObj)
{
PyObject *cmpObj(getPyCmpFunc());
if(!keyObj)
std::list< KeyWaiter *> newList,listOfEltToWakeUp;
for(std::list< KeyWaiter *>::iterator it=_waiting_keys.begin();it!=_waiting_keys.end();it++,ii++)
{
+ if((*it)->getVarName()!=varName)
+ {
+ newList.push_back(*it);
+ continue;
+ }
PyObject *waitKey((*it)->getKeyPyObj());
PyTuple_SetItem(args,1,waitKey); Py_XINCREF(waitKey);
PyObject *res(PyObject_CallObject(cmpObj,args));
PortableServer::POA_var getPOA4KeyWaiter() const { return _poa_for_key_waiter; }
void addWaitKey(KeyWaiter *kw);
void pingKey(PyObject *keyObj);
- void notifyKey(PyObject *keyObj, PyObject *valueObj);
+ void notifyKey(const std::string& varName, PyObject *keyObj, PyObject *valueObj);
SALOME::ByteVec *waitForMonoThrRev(SALOME::KeyWaiter_ptr kw);
public://remotely callable
char *getAccessOfVar(const char *varName);
SALOME::ByteVec *waitFor();
void valueJustCome(PyObject *val);
void go();
+ std::string getVarName() const { return _var->getVarNameCpp(); }
SALOME::ByteVec *waitForMonoThr();
private:
DataScopeServerTransaction *getDSS() const { return static_cast<DataScopeServerTransaction *>(_var->getFather()); }//thanks to dynamic_cast in constructor
void TransactionAddKeyValue::notify()
{
- _dsct->notifyKey(_key,_value);
+ _dsct->notifyKey(getVarName(),_key,_value);
}
TransactionAddKeyValue::~TransactionAddKeyValue()