qthread struct to int