Skip to content

Commit

Permalink
Small fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinH committed Mar 19, 2019
1 parent d33fc0d commit 271be99
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/tao/pq/internal/pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace tao::pq::internal
v_push_before( *up );
if( v_is_valid( *up ) ) {
std::shared_ptr< T > sp( up.release(), deleter() );
v_push_success( *up );
v_push_success( *sp );
const std::lock_guard lock( m_mutex );
m_items.emplace_back( std::move( sp ) );
}
Expand Down Expand Up @@ -130,8 +130,7 @@ namespace tao::pq::internal
auto it = m_items.begin();
while( it != m_items.end() ) {
if( !v_is_valid( **it ) ) {
const auto ti = it++;
deferred_delete.splice( deferred_delete.end(), m_items, ti );
deferred_delete.splice( deferred_delete.end(), m_items, it++ );
}
else {
++it;
Expand Down

0 comments on commit 271be99

Please sign in to comment.