logoalt Hacker News

1718627440yesterday at 1:57 PM1 replyview on HN

> static char buf[64];

In a function? That makes the function not-threadsafe and the function itself stateful. There are places, where you want this, but I would refrain from doing that in the general case.


Replies

Borg3yesterday at 8:59 PM

Holy moly.. Thread safety.. Good point and Bad point. I myself use threads sparsly, so I dont intermix calls between threads..

show 1 reply