$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Kobi Cohen-Arazi (kobi.cohenarazi_at_[hidden])
Date: 2006-05-11 12:08:49
>
> Procedure * Procedure_Pool::find_by_id(int _id)
> {
> LD_TRACE("Procedure_Pool::find_by_id");
> mutex_.acquire();
> Procedure_By_Id::iterator it = procedure_by_id_.find(_id);
> if (it != procedure_by_id_.end()) {
> ACE_DEBUG((LM_DEBUG, "%N:%l Found procedure for id: %d
> \n", _id));
> mutex_.release();
> return *it;
> }
> ACE_DEBUG((LM_DEBUG, "%N:%l Not able to found procedure for id: %d
> \n", _id));
> mutex_.release();
> // return null
> return 0;
> }
BTW, As a side note, I highly recommend you to use ACE Guards (RAII...) for
the mutex thing.
Kobi