It's 2006. I'm working with threads in C and it's awful
-
@eniko Why so awful ??
@gilesgoat idk it's like all the bad stuff of working with threads but also none of the conveniences. In fact more like a giant pile of additional inconveniences
-
@eniko Well, yes... But rest assured, threads in C++ are awful. Threads in Java are awful. Threads in Python are double-plus awful.
And they're still needed, so have an ice cream (or other treat) every time you added tread-using code to your project.
-
@eniko Well, yes... But rest assured, threads in C++ are awful. Threads in Java are awful. Threads in Python are double-plus awful.
And they're still needed, so have an ice cream (or other treat) every time you added tread-using code to your project.
@halla I've worked with threads in other languages before. They're always bad but C makes it a lot worse
-
@pixx it's just as bad as working with threads in any other language but there's no functional standard and the api is worse
-
@eniko you could leave "in C" out and it would be about the same
@joe but threads in C are worse than any other language
-
It's 2006. I'm working with threads in C and it's awful
It's 2016. I'm working with threads in C and it's awful
It's 2026. I'm working with threads in C and it's awful
"Oh well threads are bad in <other language> too"
No you don't understand. Working with threads in C doesn't really actually work and if you do get it to work it's still so much fucking worse than working with threads in any other language
-
@silvermoon82 and the w is for works well in windows
@eniko
Oof, *windows* threads in C! Fun fun! -
@eniko
Oof, *windows* threads in C! Fun fun!@silvermoon82 well wtf good is writing something in C if it's not maximally portable :/
-
"Oh well threads are bad in <other language> too"
No you don't understand. Working with threads in C doesn't really actually work and if you do get it to work it's still so much fucking worse than working with threads in any other language
Like, I'm *good* at avoiding the pitfalls of threads. Normally. In any other language that *isn't* C
-
Like, I'm *good* at avoiding the pitfalls of threads. Normally. In any other language that *isn't* C
Oh what's that? C11 standardized threads.h? OK well the api looks pretty trash but I guess anything's better than pthreads. Let me just open VS2022, msvc, ok... #include <threads.h>
....... why are there like two dozen compiler errors *in the damn header*?
-
It's 2006. I'm working with threads in C and it's awful
It's 2016. I'm working with threads in C and it's awful
It's 2026. I'm working with threads in C and it's awful
@eniko Consistency is nice I guess? -
@khleedril @eniko
Are they though?
Threads have a lot more problems than memory issues
-
Oh what's that? C11 standardized threads.h? OK well the api looks pretty trash but I guess anything's better than pthreads. Let me just open VS2022, msvc, ok... #include <threads.h>
....... why are there like two dozen compiler errors *in the damn header*?
"Oh well if you're writing C you should be running Linu-"
I am not going to switch operating systems just to make it 5% less miserable to work with threads in C!!!
-
Oh what's that? C11 standardized threads.h? OK well the api looks pretty trash but I guess anything's better than pthreads. Let me just open VS2022, msvc, ok... #include <threads.h>
....... why are there like two dozen compiler errors *in the damn header*?
@eniko IIUC you can declare a C-compiler C11 compatible but not have support for the concurrency API, in which case the compiler defines __STDC_NO_THREADS__ and you can't include threads.h
-
@eniko IIUC you can declare a C-compiler C11 compatible but not have support for the concurrency API, in which case the compiler defines __STDC_NO_THREADS__ and you can't include threads.h
@gabrielesvelto that sounds like threads in C alright
-
@eniko IIUC you can declare a C-compiler C11 compatible but not have support for the concurrency API, in which case the compiler defines __STDC_NO_THREADS__ and you can't include threads.h
@gabrielesvelto @eniko
Why am I totally unsurprised.
Appalled yes, but unsurprised. -
It's 2006. I'm working with threads in C and it's awful
It's 2016. I'm working with threads in C and it's awful
It's 2026. I'm working with threads in C and it's awful
@eniko i have an easier time working with multiprocess than multithreading. that should tell you everything
-
"Oh well if you're writing C you should be running Linu-"
I am not going to switch operating systems just to make it 5% less miserable to work with threads in C!!!
@eniko also switching to linux isn't going to make compiling for windows any less miserable
threads.h will still be broken
-
Oh what's that? C11 standardized threads.h? OK well the api looks pretty trash but I guess anything's better than pthreads. Let me just open VS2022, msvc, ok... #include <threads.h>
....... why are there like two dozen compiler errors *in the damn header*?
@eniko Huh, TIL C99 has been superseded!
(My familiarity with C is just enough to be able to write patches for established software, but I can't write it from scratch.)
-
@eniko also switching to linux isn't going to make compiling for windows any less miserable
threads.h will still be broken
@clarfonthey and if you're making a single header library it still has to compile on msvc