two ways to return value to thread invoking pthread_join