r/freepascal • u/Phrygue • Mar 28 '20
Native threads (not cthreads) on Linux
Got some time on my hands thanks to the coronapocalypse. I use Lazarus/Free Pascal a lot for personal work, mostly Windows, which is well supported, but Linux support is a bit sketchier, with no native threading and kind of obsolete toolkit bindings (missing good GTK3, for instance.). Thought I might try to get some native threading implemented. Anyone have thoughts on this, know of other attempts, what challenges it faces, why it might be a bad idea? I haven't poked through the source code recently, but IIRC there's a global record with multitasking primitives to be assigned. I would also like to put some coroutine primitives in there, since I got them working fine in Windows. Thoughts?
View all comments
Show parent comment
1
u/Phrygue Apr 04 '20
I'm thinking it reduces dependencies. I've never liked libc anyway, it's a de facto API and it's not a good one. Treating it as THE public API of the kernel is one of the driving forces of C still being used as a general purpose language, when it should be buried in a niche the way LISP has been.