simple pthread implementation of a mutli threaded server