use threads; ... threads->create(\&draw, arg1, arg2, ...)->detach(); ...