Restrict package installation to 1 thread
It is possible that a package contains the same file multiple times. This leads to possible corruption or installation failure when they are extracted on different threads. (easy to reproduce with DeS)
This commit is contained in:
@@ -968,7 +968,7 @@ bool package_reader::extract_data(atomic_t<double>& sync)
|
||||
atomic_t<usz> entry_indexer = 0;
|
||||
atomic_t<usz> thread_indexer = 0;
|
||||
|
||||
m_bufs.resize(std::min<usz>(utils::get_thread_count(), entries.size()));
|
||||
m_bufs.resize(std::min<usz>(1 /*utils::get_thread_count()*/, entries.size()));
|
||||
|
||||
named_thread_group workers("PKG Installer "sv, std::max<usz>(m_bufs.size(), 1) - 1, [&]()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user