3.4.7. Nbor list protocol

The nbor list handling is based on these principles:

  1. Threads need to lock their nbor lists while updating them.

  2. While accessing the nbor lists of other tasks threads must acquire a read-lock on the nbor list.

  3. If at some point in (wall clock) time a task (A) has an nbor list that contains an nbor (B) that does not have task A in its nbor list, then to avoid deadlocks, a check_ready() on task happens as a consequence of it being added to the nbor list of task B.