While crossing the CGo boundary ensures that a goroutine is not swapped from one OS thread to another (via LockOSThread), it's still possible, under high concurrency, for multiple OS threads to access a CGo section at the same time. Adding mutexes to ensure that doesn't happen as libpostal is not thread-safe.
While crossing the CGo boundary ensures that a goroutine is not swapped from one OS thread to another (via LockOSThread), it's still possible, under high concurrency, for multiple OS threads to access a CGo section at the same time. Adding mutexes to ensure that doesn't happen as libpostal is not thread-safe.