LightGBM icon indicating copy to clipboard operation
LightGBM copied to clipboard

Q: thread safe, In file src/application/predictor.hpp

Open hlee13 opened this issue 9 years ago • 5 comments

Such as the title.

branch master, file: src/application/predictor.hpp , line:150

if I change the function 'fprintf' to 'fwrite', it would not be thread safe. I want to use fwrite, but found do not work. If I need use lock when call fwrite function

hlee13 avatar Jun 23 '17 11:06 hlee13

sorry, I didn't get you. why need to change to fwrite ?

guolinke avatar Jun 23 '17 12:06 guolinke

image

I found the problem.

hlee13 avatar Jun 23 '17 12:06 hlee13

I want a binary file.

data is std::vector < double > when I use fwrite, the file contains both Big_endian and Little_endian.

hlee13 avatar Jun 23 '17 12:06 hlee13

I get it, sorry.

hlee13 avatar Jun 23 '17 12:06 hlee13

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

github-actions[bot] avatar Aug 24 '23 01:08 github-actions[bot]