Update thread.js

fix caculate method for pager.max