Use a proper condition variable for variable callback handling