Thread Safety and Concurrent Reading

Hi,

In my previous post it was confirmed that it should be safe to concurrently read from multiple spreadsheets simultaneously. Thank you @mario.gembox for the reply. I have found that reading worksheets concurrently works as expected. However, I have some concerns regarding the thread-safety of the underlying streaming and buffering mechanism.

Specifically, my questions are:

  1. Thread-Safety: When reading multiple worksheets concurrently, is the internal stream and buffering code fully thread-safe? More precisely, does the library load the entire file into memory and isolate worksheet data, or is there any shared caching/buffering logic that might be subject to contention or cache thrashing when accessed by multiple threads concurrently?
  2. Seekable Streams: If I provide a seekable stream, does the library take advantage of that capability? In other words, does a seekable stream further isolate buffering for concurrent read access, or are the internal buffering mechanisms independent of the stream’s seekability?

The entire file is read at once and represented with a rich content model (ExcelFile object) so in short, there is no need for those concerns.

Regards,
Mario

1 Like