# TH1::StatOverflows is not thread safe

**URL:** <https://root-forum.cern.ch/t/th1-statoverflows-is-not-thread-safe/27475>\
**Category:** Evolution Proposals, Apps & Ideas\
**Created:** [January 7, 2018, 4:49pm UTC](https://root-forum.cern.ch/t/th1-statoverflows-is-not-thread-safe/27475 "2018-01-07T16:49:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fwyzard](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fwyzard/32/15532_2.png) [@fwyzard](https://root-forum.cern.ch/u/fwyzard)\
**Post date:** [January 7, 2018, 4:49pm UTC](https://root-forum.cern.ch/t/th1-statoverflows-is-not-thread-safe/27475/1 "2018-01-07T16:49:15Z")

</div>

`TH1::StatOverflows` relies on a `static` member variable to alter the behaviour of `TH1::Fill`, making it impossible to use the latter safely in a multi-threaded program.

Are there any plans to change this to allow proper operations in a multi-threaded program ?

---

<div class="post-metadata">

**Author:** ![fwyzard](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fwyzard/32/15532_2.png) [@fwyzard](https://root-forum.cern.ch/u/fwyzard)\
**Post date:** [January 7, 2018, 4:51pm UTC](https://root-forum.cern.ch/t/th1-statoverflows-is-not-thread-safe/27475/2 "2018-01-07T16:51:04Z")

</div>

P.S. looks like I asked a similar question 4 1/2 years ago: [TH1::StatOverflows](https://root-forum.cern.ch/t/th1-statoverflows/16302) .

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [January 8, 2018, 7:54am UTC](https://root-forum.cern.ch/t/th1-statoverflows-is-not-thread-safe/27475/3 "2018-01-08T07:54:40Z")

</div>

Hi Andrea,

thanks for (re)reporting. I opened ROOT-9164 which is blocking the upgrade of the analysis tools for 6.16. We’ll be looking into this.

Cheers,  
D
