(you don't have to strictly follow this form)

**Describe the bug**
The following query leads to OOM if server was built with thread sanitizer.

```sql
SELECT range(65535) FROM system.one ARRAY JOIN range(65536) AS number

explicit ParallelFormattingOutputFormat(Params params)
        : IOutputFormat(params.header, params.out)
        , internal_formatter_creator(params.internal_formatter_creator)
        , pool(params.max_threads_for_parallel_formatting)
    {
        
        
        processing_units.resize(params.max_threads_for_parallel_formatting + 2);
        collector_thread = ThreadFromGlobalPool([&] { collectorThreadFunction(); });
        LOG_TRACE(&Poco::Logger::get("ParallelFormattingOutputFormat"), "Parallel formatting is being used");
    }
    ~ParallelFormattingOutputFormat() override
    {
        finishAndWait();
    }
    String getName() const override { return "ParallelFormattingOutputFormat"; }
    void flush() override
    {
        need_flush = true;
    }
    void doWritePrefix() override
    {
        addChunk(Chunk{}, ProcessingUnitType::START,  true);
    }
    void onCancel() override
    {
        finishAndWait();
    }
    
    void onProgress(const Progress &) override {}