mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

#swiftlang

21 posts10 participants0 posts today

Periodic reminder that `Task.detached` is semantically equivalent to `DISPATCH_BLOCK_DETACHED`. e.g. it opts out of automatic priority propagation, task locals, cancellation, etc…

So far 100% of the time I've mentioned this the response has been "what's DISPATCH_BLOCK_DETACHED?", which should give you an idea of how rare uses of `Task.detached` should be.

As the docs say: "Don’t use a detached task if it’s possible to model the operation using structured concurrency features"

For macOS logging I'm trying to use the recommended bundle ID as the OSLog subsystem, so I use the following code snippet. But it seems like I might as well hardcode the subsystem since bundleIdentifier might be nil. Is there a better way to get the bundle ID (or PRODUCT_NAME) in code?

extension Logger {
static let subsystem = Bundle.main.bundleIdentifier ?? "org.foo.MyApp"
}

Begin a career with one of the world’s largest virtual companies where you have flexibility and space to grow, just as we have been able to thanks to our team. Use the latest tools and technology to produce your best work and enjoy remuneration that’s reflective of your skills and experience. iosdevjobs.com/jobs/m-d1059bef #Swift #SwiftLang #iOSDev #MacDev #iOSDevJobs

iosdevjobs.comRemote iOS Developer @ ScopicAre you an iOS developer with a strong command of Objective-C, Swift, and C++? Are you excited by the idea of building cutting-edge, high-performance applications used around the world? If so, we’d love to hear from you!