Using task and semaphore for win form.