Make all threads run simultaneously

Also, change ThreadFunc from int to void*
- Make print dialog insensitive while generation is in progress