Generate tables for each thread