Ben Rimmington wrote:

> William Shipley wrote:
>
> > I may be missing something, but I don’t understand how to get the behavior
> > of dispatch_once() without a bunch more code in cases in which I was using
> > it to initialize “lazy-ish" instance variables.
>
> In Objective-C, the `dispatch_once_t` predicate *must* be a static or global
> variable (which is automatically initialized to zero).

Greg Parker on Stack Overflow:

<http://stackoverflow.com/a/19845164>

-- Ben
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to