use OpenGL; use threads; my $thr = threads->create(\&update_memory_use); sub update_memory_use {}