changed locking queue to generic type