gozxing icon indicating copy to clipboard operation
gozxing copied to clipboard

Question: Are the decode and encode operations goroutine safe for each encoder or decoder?

Open amikai opened this issue 7 months ago • 2 comments

In my use case, I use the QRCodeReader.Decode method to decode images. I employ multiple goroutines to call Decode on a single QRCodeReader. Could this cause a data race issue?

amikai avatar May 23 '25 13:05 amikai

@amikai As far as I remember, the internal state of QRCodeReader is static, so race conditions should not occur.

makiuchi-d avatar Jun 03 '25 08:06 makiuchi-d

👋 Hey @amikai / @makiuchi-d - potentially my change here might be relevant and of interest: https://github.com/makiuchi-d/gozxing/pull/75

bashhack avatar Jul 17 '25 20:07 bashhack