2 ms·
Nice! dispatch is a lovely API. Concurrent queues are nice to have, but the real magic is in serial queues. For example, we can wrap a hash table in a dispatch
by ridiculous_fish 11y ago
Nice! dispatch is a lovely API. Concurrent queues are nice to have, but the real magic is in serial queues.
For example, we can wrap a hash table in a dispatch queue: get() uses dispatch_sync, set() uses dispatch_async, and boom: our hash table rehashes in the background, instead of forcing set() to wait.
What are some other APIs that enable you to build a hash table like that?