1. 57
  1.  

  2. 2

    In the push(task) in “Going lock-free…” section, there seems to be a reference to a t that is not defined anywhere?

    Also, I’m not sure I understand how the push is expected to work without overwriting another concurrent push; shouldn’t the tail be incremented first, and only then the task stored? or is there something else I’m missing? But maybe things will clear up once the issue of the missing t is fixed? edit: Ok, I get this part now, I forgot that this is a thread-local queue, where only Single Producer can add things. So no races between pushes.

    edit 2: As to the missing t, based on a fragment of the linked source repository, I assume t is intended to be basically equivalent to tail. Given that, again, only the Single Producer will ever write to it.

    1. 2

      Nice catch. Looks like the post is full of grammatical errors. Also yes the t is tail and can be loaded & stored to without rmw synchronization given it’s single producer (SPMC).