News for hackers. Stuff that matters.
Re:Coroutines in C by Quekid5 on Sunday February 25, 2024 @12:09PM (#39502510)
Not just that, but the scaling problems with threads are usually massively overstated. It's true that thread switching has quite a bit more overhead, but it's been optimized a lot since the bad old days of 15+ years ago. (Plus, unless you're using a massive number of threads it's very unlikely that thread switching is going to be your bottleneck.)
Re:Coroutines in C by jeffreygoesto on Sunday February 25, 2024 @12:58PM (#39503032)
Unless you're on QNX 7 of course...
Re:Coroutines in C by Quekid5 on Wednesday February 28, 2024 @06:01PM (#39544635)
Something something exception that proves the rule?

I'm not familiar with QNX other than knowing that it is a an RTOS... which I imagine imposes some constraints that complicate things quite a lot?

Re:Coroutines in C by jeffreygoesto on Saturday March 02, 2024 @08:10AM (#39572292)
It runs in millions of cars and other embedded systems, not that niche tbh. Your "exception" is the rule for a lot of engineers.

But yes, they took pride that process switching is as efficient as thread switching which is a slick way of selling that they never optimized threads to be better, unlike Linux. Until QNX8 there is also the "big kernel lock"...

Re:Coroutines in C by Quekid5 on Tuesday March 05, 2024 @05:14PM (#39609809)
> It runs in millions of cars and other embedded systems, not that niche tbh.

Linux (in some mutilated form) runs on billions of devices. Hell, even JavaME does; or at least did, not sure what current status is. That's not really a worthwhile comparison.

My 'niche' mention was in relation to number of devs who'd be familiar with it.

> Your "exception" is the rule for a lot of engineers.

Now, that's a fair comparison... but I wager "a lot" is still not nearly the number of engineers/devs that work with e.g. Linux. That's not to cast any aspersions, of course. After all it's often not really a choice of the engineer's part.

Not sure how we got to this tangent, tbh.