Skip to content

Commit b0eb067

Browse files
committed
Add thread-safety documentation to codec interfaces
1 parent 7bcc896 commit b0eb067

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/main/java/org/glavo/nbt/io/NBTCodec.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
import java.util.function.Function;
3333

3434
/// The codec for reading and writing NBT data.
35+
///
36+
/// Each NBTCodec instance is immutable, thread-safe, and can be safely used by multiple threads.
3537
public sealed interface NBTCodec permits NBTCodecImpl {
3638

3739
/// Returns the default [NBTCodec].

‎src/main/java/org/glavo/nbt/io/SNBTCodec.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import java.io.IOException;
2323

2424
/// The codec for reading and writing Stringified NBT data.
25+
///
26+
/// Each SNBTCodec instance is immutable, thread-safe, and can be safely used by multiple threads.
2527
public sealed interface SNBTCodec permits SNBTCodecImpl {
2628

2729
/// Returns the default [SNBTCodec].

0 commit comments

Comments
 (0)