I found that the working mechanism of dispatch_barrier_async is that it only executes after all blocks previously added to the queue are complete. It works like a sequential queue.
Therefore, I do not distinguish between the differences between the two modes of operation in GCD.
dispatch_barrier_[a]syncDesigned for use with a parallel queue. They are also intended for use with calls dispatch_[a]sync.
dispatch_barrier_[a]sync
dispatch_[a]sync
"multi-reader, one writer". . "" dispatch_[a]sync. "writer" dispatch_barrier_[a]sync.
, .
, - .
, . , ( 0 3 ), ( " " 4 ), ( 5 6 ).
, , , . , " ".
, :
, , , , . , , , , , . , , . , .
, 10 , 11- . , 10 , , 10 ( " ").
, rmaddy (+1), - - , ( ), ( ). dispatch_sync dispatch_barrier_async .
dispatch_sync
dispatch_barrier_async
Source: https://habr.com/ru/post/1656430/More articles:Asp.net MVC - How to Hash a Password - c #MVC - How to hash and salt - c #Javascript score target alert - javascriptHow does this code calculate pi with high precision? - cFirebase 3.6.0 (Auth) - detecting a specific error with Swift 3.0 - iosHow to send and receive hidden value using Ajax - javascriptLaravel 5.3 Schedule Doesn't work (ready-to-run commands aren't ready). - phpAn idiomatic way of calculating a template parameter depending on other parameters - c ++peewee and peewee-async: why is asynchronous slow - pythonxcode stucks when checking assets in iTunes store when downloading archive - iosAll Articles