News for hackers. Stuff that matters.
Re:Swift System Is Now Open Source by coldtea on Friday September 25, 2020 @09:06PM (#24595582)
It might not offer first class support for green threads like Go, but GCD is an even better imho model for 90% of concurrency needs of the average app:

https://developer.apple.com/documentation/DISPATCH

Re:Swift System Is Now Open Source by microcolonel on Friday September 25, 2020 @09:15PM (#24595623)
"concurrency needs of the average app" is different from what Go does well with green threads; this seems like something Swift does notably worse, but well enough that it doesn't annoy you in your use case. I feel like this is a different standard from "if Go can do it, Swift can do it better".
Re:Swift System Is Now Open Source by harikb on Friday September 25, 2020 @09:19PM (#24595644)
Isn’t that just a bridge to an existing OS level feature? Also is GCD green? (As in light weight, co-operative muti-threading)
Re:Swift System Is Now Open Source by coldtea on Friday September 25, 2020 @09:29PM (#24595689)
>Isn’t that just a bridge to an existing OS level feature?

Yes. A feature well designed for this very purpose.

>Also is GCD green?

GCD tasks are not green threads but they're not direct threads either (even though they're used under the hood). They're more lightweight and much faster to create (than direct OS threads).