Avatar
omochimetaru 10/8/2019 2:19 AM
あ、barrierの仕様読み間違えたかな、
2:19 AM
Work items submitted prior to the barrier execute to completion, at which point the barrier work item executes. Once the barrier work item finishes, the queue returns to scheduling work items that were submitted after the barrier.
2:19 AM
バリア中は他のタスクは走ってないからread/writeの同時実行は生じていないのか。
2:20 AM
concurrent queueをbarrierで同期するコストのほうが、serial queueより重いというのがあるかもしれません。
2:20 AM
内部的にserial queueがsyncされるとき、実際にスレッドリソースとかは使っていなくて
2:21 AM
キューの投入エントリが0個/1個だけのときは、mutexでロックするだけになるんですよね。