move process_dives to the mainthread

Avoids a race condition.

Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>