duemunk / Async

Syntactic sugar in Swift for asynchronous dispatches in Grand Central Dispatch
MIT License
4.59k stars 316 forks source link

Question: Does Async implement Capture Lists? #43

Closed ctews closed 9 years ago

ctews commented 9 years ago

Just a small question does Async honor Swift Capture Lists if you use self references in an Async.background closure?

duemunk commented 9 years ago

I don't know of Capture Lists. What are they? Async works no different than GCD and blocks in general as far as I know.

I usually do the [weak self] dance if necessary.

ctews commented 9 years ago

Ah sorry, my fault ;) dumb question I used to use the short Syntax Async.background { ... } but of course you can use Async.background { [unowned/weak self]() -> Void in ... }.

Stupid me ;)