Software Engineer | iOS Developer
Greetings! I am Kevin, an accomplished iOS Software Developer with expertise in software development, architecture, testing, maintenance, and debugging of complex software systems. I have more than five years of experience in developing high-quality iOS apps using Swift programming language, UIKit, SwiftUI and Combine frameworks. With a keen eye for detail and a strong understanding of the latest cutting-edge development tools and procedures, I am dedicated to delivering exceptional results that meet or exceed the needs of my clients. I have a proven track record of working both independently and collaboratively as part of a productive team, and I am able to effectively self-manage during independent projects. Thank you for visiting my personal blog, where I look forward to sharing my knowledge and expertise in iOS development and contributing to the vibrant developer community.
Markdown supported · ⌘↵ to post
Maximus
This is a wrong assumption. Initialization is not thread-safe, the initialization block can be called multiple times in a concurrent environment. For example:
class Example { lazy var value: Int = { print("Initializing value") return 42 }() } let instance = Example() DispatchQueue.global().async { print("Thread 1: \(instance.value)") } DispatchQueue.global().async { print("Thread 2: \(instance.value)") }"Initializing value" will be printed twice. See also this discussion - forums.swift.org/t/lazy-property-initialization-question/51085/8 for deeper understanding.