Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bashokba committed Apr 13, 2021
1 parent b59caec commit ab42712
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libopflex/engine/Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,13 @@ bool Processor::declareObj(ClassInfo::class_type_t type, const item& i,
// syncing the managed object over opflex
void Processor::processItem(obj_state_by_exp::iterator& it) {
StoreClient::notif_t notifs;

std::unique_lock<std::mutex> guard(item_mutex);
ItemState curState = it->details->state;

LOG(DEBUG) << "ref count of the object "<< it->details->refcount;
LOG(DEBUG) << "item state of the object "<< it->details->state;

size_t curRefCount = it->details->refcount;
bool local = it->details->local;

Expand All @@ -369,6 +373,8 @@ void Processor::processItem(obj_state_by_exp::iterator& it) {
}

const ClassInfo& ci = store->getClassInfo(it->details->class_id);
LOG(DEBUG) << "Class ID of the object ---"<< it->details->class_id;

if (ci.getType() != ClassInfo::OBSERVABLE) {
LOG(DEBUG) << "Processing " << (local ? "local" : "nonlocal")
<< " item " << it->uri.toString()
Expand Down Expand Up @@ -471,6 +477,7 @@ void Processor::processItem(obj_state_by_exp::iterator& it) {
}
}

LOG(DEBUG) << "CUR REF COUNT-- "<< curRefCount;
if (curRefCount > 0) {
resolveObj(ci.getType(), *it, newexp);
newState = RESOLVED;
Expand Down

0 comments on commit ab42712

Please sign in to comment.