mongodb/mongo-perl-driver — pull request #108 by ggoossen (2014-08-04 16:14:13+00:00)
Title: request_id isn't thread safe

The way request ids are generated isn't thread safe.

In particular having a global static SV * variable (i.e. static SV * request_id) is wrong

I managed to trigger the race condition in the test case by increasing the number of threads and the number of inserts.

Made a quick fix, by using a Perl shared variable and passing the value to the corresponding functions.