TLDR;
Checking the threads:on flag is more idiomatic than forcing the include of -pthreads on Linux.
By making use of the threads:on flag, the proper thread libraries (and associated lock implementation), will be included for all supported nim platforms automatically.
I have also modified the test suite to test with both threads:on and no threads.
/cc @timotheecour
This change passes the included test suite for me locally, but I don't use mongodb myself. Can you test this PR on your code to make it sure it works for a real world application?
Feel free to make any code review or other suggestions as well. 😄
See here for more details: https://github.com/nim-lang/Nim/issues/12330
TLDR; Checking the
threads:on
flag is more idiomatic than forcing the include of-pthreads
on Linux.By making use of the
threads:on
flag, the proper thread libraries (and associated lock implementation), will be included for all supported nim platforms automatically.I have also modified the test suite to test with both
threads:on
and no threads./cc @timotheecour This change passes the included test suite for me locally, but I don't use mongodb myself. Can you test this PR on your code to make it sure it works for a real world application? Feel free to make any code review or other suggestions as well. 😄