add a

while(key_t) wait(1);

after

if(key_t && gv_cubes<MAX_THREADS){

change in speed is magnificant, but idk if it reaaly worths it? (at least from my programmin skill level.)


3333333333