ssa.c: Block access thread until all pushed tasks will be processed.

 From Glib implementation is not clear what exactly
 g_thread_pool_unprocessed returns: number of waiting tasks
 or number of waintig + processing tasks.
 Instead of g_thread_pool_unprocessed, access will use an
 atomic variable: tasks_num.