add rwlocks for queues

Signed-off-by: James Paton <jpaton2@gmail.com>