avoid a race condition accessing the table->size outside of a critical section