making table_collector thread safe