Remix.run Logo
pg83 5 hours ago

I guess I just didn't notice. In any case, it wouldn't have been std::thread, but https://github.com/pg83/std/blob/master/std/thr/thread.h from my bike lib!

grg0 5 hours ago | parent [-]

What do you mean you didn't notice? I saw another comment about Claude below, are you not even reviewing the output?

I just browsed the project for two minutes and it's one of the first things I noticed. std::thread is more portable (Windows, if anyone cares) and allows you to pass in a lambda, which keeps the code local and also has the compiler generate the closure for you instead of having to pass function pointers and void* captures around. I don't see any advantage to using pthread directly.

pg83 5 hours ago | parent [-]

> What do you mean you didn't notice? I saw another comment about Claude below, are you not even reviewing the output?

Of course I looked at the LLM output, but people, uh, make mistakes and can miss something.

> std::thread is more portable (Windows, if anyone cares) and allows you to pass in a lambda, which keeps the code local and also has the compiler generate the closure for you instead of having to pass function pointers and void* captures around. I don't see any advantage to using pthread directly.

These are obvious things, and the objections to them are equally obvious. For example, std::thread is an additional level of abstraction over pthreads, which, in essence (not in form), gives me nothing. And I don't care about Windows, really.