Threads in realtime handler