32 template <container C>
41 template <container C>
45 for (q = binq_->first(); q; q = q2) {
58 while ((q =
spdeq(&sptree_->root)) !=
nullptr) {
64 while (pq_que_.size()) {
65 delete pq_que_.top().second;
70 template <container C>
75 binq_->enqueue(td,
i);
87 if (nl && (tnew > nl->
t_)) {
88 least_ =
spdeq(&sptree_->root);
101 nl = pq_que_.top().second;
102 if (nl && (tnew > nl->
t_)) {
105 pq_que_.push(make_TQPair(b));
114 move_least_nolock(tnew);
115 }
else if (tnew < least_->t_) {
118 spenq(least_, sptree_);
131 move_least_nolock(tnew);
132 }
else if (tnew < least_->t_) {
136 qmove->
cnt_ =
i->cnt_;
138 pq_que_.push(make_TQPair(least_));
144 qmove->
cnt_ =
i->cnt_;
146 pq_que_.push(make_TQPair(qmove));
157 if (tt < least_t_nolock()) {
164 spenq(least_, sptree_);
180 if (tt < least_t_nolock()) {
187 pq_que_.push(make_TQPair(least_));
191 pq_que_.push(make_TQPair(
i));
202 least_ =
spdeq(&sptree_->root);
218 if (pq_que_.size()) {
219 least_ = pq_que_.top().second;
234 if (least_ && least_->t_ <= tt) {
237 least_ =
spdeq(&sptree_->root);
249 if (least_ && least_->t_ <= tt) {
256 while (pq_que_.size() && pq_que_.top().second->t_ < 0.) {
257 delete pq_que_.top().second;
260 if (pq_que_.size()) {
261 least_ = pq_que_.top().second;