misc/cgo/testcarchive: avoid possible pthread_create race
The old code assumed that the thread ID set by pthread_create would be available in the newly created thread. While that is clearly true eventually, it is not necessarily true immediately. Rather than try to pass down the thread ID, just call pthread_self in the created thread. Fixes #15576 (I hope). Change-Id: Ic07086b00e4fd5676c04719a299c583320da64a1 Reviewed-on: https://go-review.googlesource.com/22880 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please
register
or
sign in
to comment