bufbuild / protovalidate-go

Protocol Buffer Validation for Go
https://pkg.go.dev/github.com/bufbuild/protovalidate-go
Apache License 2.0
273 stars 18 forks source link

[Documentation needed] Goroutine/thread-safety #155

Closed mivanovcpd closed 2 hours ago

mivanovcpd commented 2 hours ago

Feature description: There's no documentation on whether you need to create multiple protovalidate instances if you want to call them in parallel from goroutines.

Problem it solves or use case: Prevent race conditions.

Proposed implementation or solution: Proper documentation on the best practice.

Contribution: As a non-dev on the project, I can't contribute much since I don't know if it was designed to be thread-safe or not.

Examples or references: For the JVM version, there was an explicit mention to create multiple instances since it's not thread-safe.

Additional context:

mivanovcpd commented 2 hours ago

I just read the code itself, it said it supports validation in parallel. Closing.