virtual void operationComplete(ostc_OperationResult*) const;
Performs any required cleanup after execute() and associated executions of format() complete.
void ostc_ServerOperation::operationComplete(
ostc_OperationResult * result
) const
{
os_collection * coll;
os_cursor * cursor;
result->getReturnValue(coll, cursor);
if (coll)
delete coll;
if (cursor)
delete cursor;
}
Your implementation of operationComplete() must be reentrant. That is, you are responsible for synchronizing access to any transient state that could be shared across Server threads. In addition, for operations that use shared_update transactions, you must synchronize access to persistent data if that is necessary to prevent interference among threads.