Data-race safety in Swift 5.10

Swift 5.10 has been released with improved data-race protection:
https://www.swift.org/blog/swift-5.10-released/

2 Likes

See, see, this is why Xojo is better, you don’t need to worry about race conditions, because it’s all executed synchronously on one core. Why would you ever want to use more than one core, that’s just silly. /s

But is all this diagnostic stuff really needed? Developer should know how to use locks to guard data or know how to organize code and data in a way that locking is not needed.

when things can be determined by the compiler then why not ?

thats whats going on here

reasoning about preemptive threads IS darned hard and you can never be too sure

Many new languages are specifically designed to make it so the most common errors in coding CANT be made any more therefore making increasingly complex software safer

Personally I’m all for it

3 Likes

Don’t forget that this gets harder with E cores, which can be 3x slower than a P core and while you can specify which you like, it’s up to the scheduler which thread is run on which core. So you can ask all threads to be on the P cores, but one might end up on the E core.

In an ideal world and situation, threads shouldn’t rely on other threads…

1 Like