Glut Application Crash

I have the following application that attempts to perform multi-threaded rendering inside a glut application. Any ideas on why this crashes?



#include <X11/Xlib.h>  // for XInitThreads() call
#include <GL/glut.h> // GL Utility Toolkit
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>

boost::mutex gdmutex;

void display(void)
{
    boost::mutex::scoped_lock lock(gdmutex);
   
    glClear(GL_COLOR_BUFFER_BIT); 
    glutSolidTetrahedron();
    glutSwapBuffers();
}

void render(void)
{
    while(true) { display(); }
}

void visible(int state)
{
    static bool once(false);
    
    if(!once) { boost::thread rthread(&render); }
    
    once = true;
}

int main(int argc, char* argv[])
{
    XInitThreads();
    
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DOUBLE);
    glutCreateWindow("Sample");
    
    glutDisplayFunc(display);
    glutVisibilityFunc(visible);
    
    glutMainLoop();

    return 0;
}

Is there a makeCurrent concept in GLUT? That is the only thing I notice.