mirror of
https://github.com/Zygo/bees.git
synced 2025-05-18 05:45:45 +02:00
crucible: progress: drop the set() method
set() was broken and redundant. Calling hold() and discarding the returned object has the correct effect. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
1beb61fb78
commit
8bc4bee8a3
@ -22,7 +22,6 @@ namespace crucible {
|
|||||||
ProgressTracker(const value_type &v);
|
ProgressTracker(const value_type &v);
|
||||||
value_type begin();
|
value_type begin();
|
||||||
value_type end();
|
value_type end();
|
||||||
void set(const value_type &v);
|
|
||||||
|
|
||||||
ProgressHolder hold(const value_type &v);
|
ProgressHolder hold(const value_type &v);
|
||||||
|
|
||||||
@ -66,16 +65,6 @@ namespace crucible {
|
|||||||
return m_state->m_end;
|
return m_state->m_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
|
||||||
void
|
|
||||||
ProgressTracker<T>::set(const value_type &v)
|
|
||||||
{
|
|
||||||
unique_lock<mutex> lock(m_state->m_mutex);
|
|
||||||
if (m_state->m_end < v) {
|
|
||||||
m_state->m_end = v;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
typename ProgressTracker<T>::value_type
|
typename ProgressTracker<T>::value_type
|
||||||
ProgressTracker<T>::ProgressHolderState::get() const
|
ProgressTracker<T>::ProgressHolderState::get() const
|
||||||
|
@ -1100,7 +1100,7 @@ BeesCrawl::hold_state(const BeesFileRange &bfr)
|
|||||||
void
|
void
|
||||||
BeesCrawl::set_state(const BeesCrawlState &bcs)
|
BeesCrawl::set_state(const BeesCrawlState &bcs)
|
||||||
{
|
{
|
||||||
m_state.set(bcs);
|
m_state.hold(bcs);
|
||||||
m_ctx->roots()->crawl_state_set_dirty();
|
m_ctx->roots()->crawl_state_set_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user