Update for new gthread API