Draw line in thread