Externalize boost callback function.