# Is it safe to do parallel reads from a resqml file (.epc + .h5) in multiple threads using FESAPI 1.2.3.0

**URL:** <https://discourse.f2i-consulting.com/t/is-it-safe-to-do-parallel-reads-from-a-resqml-file-epc-h5-in-multiple-threads-using-fesapi-1-2-3-0/190>\
**Category:** FESAPI\
**Created:** [November 3, 2021, 2:27pm UTC](https://discourse.f2i-consulting.com/t/is-it-safe-to-do-parallel-reads-from-a-resqml-file-epc-h5-in-multiple-threads-using-fesapi-1-2-3-0/190 "2021-11-03T14:27:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shakirhusain](https://discourse.f2i-consulting.com/letter_avatar_proxy/v4/letter/s/6de8d8/32.png) [@shakirhusain](https://discourse.f2i-consulting.com/u/shakirhusain)\
**Post date:** [November 3, 2021, 2:27pm UTC](https://discourse.f2i-consulting.com/t/is-it-safe-to-do-parallel-reads-from-a-resqml-file-epc-h5-in-multiple-threads-using-fesapi-1-2-3-0/190/1 "2021-11-03T14:27:39Z")

</div>

Hello Philippe,

Is it safe to do parallel reads from a resqml file (.epc + .h5) in multiple threads using FESAPI 1.2.3.0 ?

Thanks,  
Shakir

---

<div class="post-metadata">

**Author:** ![philippeVerney](https://discourse.f2i-consulting.com/user_avatar/discourse.f2i-consulting.com/philippeverney/32/29_2.png) [@philippeVerney](https://discourse.f2i-consulting.com/u/philippeVerney)\
**Post date:** [November 3, 2021, 2:42pm UTC](https://discourse.f2i-consulting.com/t/is-it-safe-to-do-parallel-reads-from-a-resqml-file-epc-h5-in-multiple-threads-using-fesapi-1-2-3-0/190/2 "2021-11-03T14:42:00Z")

</div>

Hi Shakir,

The general answer is no.

However, if you build HDF5 in a thread safe mode [Questions about thread-safety and concurrent access](https://portal.hdfgroup.org/display/knowledge/Questions+about+thread-safety+and+concurrent+access) and/or if you develop your own HdfProxy class, it should much better work.

On a pure FESAPI question (no third library as HDF5) : it is generally thread safe once the deserialization has been done and the epc file closed (it only remains the DataObjectRepository). The only problem I can quickly think about is call to methods starting with `load*` as `AbstractIjkGridRepresentation.loadSplitInformation()` for example which must be finished before to make some other dependent calls in other threads such as call to `AbstractIjkGridRepresentation.getFaceCount()`

For sure, this is not a lot tested and used. I only know one FESAPI adopter doing parallel read and only on the HDF5 part and with their own developed/proprietary HdfProxy class connected to FESAPI.
