-----------------------------------------------------------------
- resulting quit logic -

	disable user interaction
	wait for the addPictures sequence to finish
	add all delayed tasks to the queue, and clear their timeouts
	if the queue has items
		wait for tasker to become idle
		send queue  (tasker should request this on its own)
	queue should be empty now
	close
	because tasker no longer needs the main program



-----------------------------------------------------------------
- possible conditions -

tasker is idle  +  queue is empty
	close

tasker is busy  +  queue is empty
	close
	because tasker no longer needs the main program

queue has items
	disable user interaction
	wait for tasker to become idle
	send queue
	close
	because tasker no longer needs the main program

there are delayed tasks waiting
	disable user interaction
	immediately add all tasks to the queue, and clear their timeouts
	wait for tasker to become idle
	send queue
	close
	because tasker no longer needs the main program

