Object tracking / chasing robot

Why dont you create dynamic

Why dont you create dynamic threads which your second thread will read through each thread with the highest priority (latest value) while your first thread reads the second thread?