+Server::Server()
+{
+ pthread_mutex_init(&mutex, NULL);
+}
+
+void Server::run()
+{
+ pthread_t thread;
+ pthread_create(&thread, NULL, Server::do_work_thunk, this);
+}
+
+void *Server::do_work_thunk(void *arg)
+{
+ Server *server = static_cast<Server *>(arg);
+ server->do_work();
+ return NULL;
+}
+
+void Server::do_work()
+{
+ for ( ;; ) {
+ printf("server thread running\n");
+ sleep(1);
+ }
+}
+