digraph UnboundedWSQ {
  rankdir=TB;

  graph [fontname="Arial"];
  node  [fontname="Arial", shape=record];
  edge  [fontname="Arial"];

  // Threads
  Owner   [label=" Owner Thread\n(single) ", shape=box];
  Thieves [label=" Thief Threads\n(multiple) ", shape=box];

  // Queue structure
  Queue [
    label="{\
      <head> Head (Top)\nsteal index |\
      Dynamic Buffer\n(resizes as needed) |\
      <tail> Tail (Bottom)\npush / pop index\
    }"
  ];

  // Operations
  Push [label=" push()\nbulk_push() ", shape=oval];
  Pop  [label=" pop() ", shape=oval];
  Steal [label=" steal() ", shape=oval];

  // Owner edges
  Owner -> Push;
  Owner -> Pop;
  Push -> Queue:tail [label=" insert at bottom\n(grow if needed) "];
  Pop  -> Queue:tail [label=" remove from bottom "];

  // Thief edges
  Thieves -> Steal;
  Steal -> Queue:head [label=" remove from top "];
}

