mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 13:25:45 +02:00
roots: split constructor into separate start method
This allows us to use the fd cache and inode resolve functions without starting crawler threads. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
0f0da21198
commit
77ef6a0638
@ -987,7 +987,7 @@ BeesContext::start()
|
||||
hash_table();
|
||||
|
||||
// Kick off the crawlers
|
||||
roots();
|
||||
roots()->start();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -546,12 +546,15 @@ BeesRoots::BeesRoots(shared_ptr<BeesContext> ctx) :
|
||||
m_crawl_thread("crawl_transid"),
|
||||
m_writeback_thread("crawl_writeback")
|
||||
{
|
||||
|
||||
m_root_ro_cache.func([&](uint64_t root) -> bool {
|
||||
return is_root_ro_nocache(root);
|
||||
});
|
||||
m_root_ro_cache.max_size(BEES_ROOT_FD_CACHE_SIZE);
|
||||
}
|
||||
|
||||
void
|
||||
BeesRoots::start()
|
||||
{
|
||||
m_crawl_thread.exec([&]() {
|
||||
// Measure current transid before creating any crawlers
|
||||
catch_all([&]() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user