Skip to content

Commit 08d29a0

Browse files
author
Vincent Wilms
committed
docs: reflect thread-safe SimpleReadingChunkCache in concurrency guide
1 parent fd3fb4e commit 08d29a0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

doc/reading/concurrency.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ A per-operation driver is allocated for every read, so a dataset or attribute re
1515
> [!WARNING]
1616
> The `Open(Stream)` overload is only thread-safe when the stream is a `FileStream`: PureHDF unwraps a `FileStream` to a handle driver that reads positionally (`RandomAccess.Read`), so each operation carries its own position and never touches the stream's cursor. Any other `Stream` subclass is driven through a shared cursor, so concurrent reads through it silently corrupt data. To read a non-`FileStream` remote source concurrently, implement `IConcurrentStream` and use `Open(IConcurrentStream)` instead.
1717
18-
> The multi-threading support comes **without** significant usage of locking. Currently only the global heap cache uses thread synchronization primitives.
18+
> The multi-threading support comes **without** significant usage of locking. Only the global heap cache and the chunk cache use thread synchronization primitives.
1919
20-
> [!WARNING]
21-
> The default `SimpleReadingChunkCache` is not thread safe and therefore every read operation must use its own cache (which is the default). This will be solved in a future release.
20+
> [!NOTE]
21+
> The default `SimpleReadingChunkCache` is thread safe and may be shared across concurrent reads by passing one instance via `H5DatasetAccess.ChunkCache`. The default path builds a fresh cache per read, so the lock only matters when you opt into sharing — which is the only reason to pass a cache in the first place, since it is what makes repeated reads of the same chunks cheap.
2222
2323
## Multi-Threading (Memory-Mapped File)
2424

0 commit comments

Comments
 (0)