use long poll to handle table updates

consider refreshing the semaphore lock as well.