Skip to content

Commit

Permalink
Add log entry with number of threads when thread pool is started
Browse files Browse the repository at this point in the history
  • Loading branch information
joto committed Dec 20, 2020
1 parent 8674b42 commit 34cf9d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/osmdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,12 @@ void osmdata_t::reprocess_marked() const

void osmdata_t::postprocess_database() const
{
auto const num_threads = m_parallel_indexing ? m_num_procs : 1;
log_debug("Starting pool with {} threads.", num_threads);

// All the intensive parts of this are long-running PostgreSQL commands.
// They will be run in a thread pool.
thread_pool_t pool{m_parallel_indexing ? m_num_procs : 1};
thread_pool_t pool{num_threads};

if (m_droptemp) {
// When dropping middle tables, make sure they are gone before
Expand Down

0 comments on commit 34cf9d8

Please sign in to comment.