JS: pass the current thread explicity into threadWait to prepare for error handling
JS: pass the current thread explicity into threadWait to prepare for error handling

threadwait will need to test the die flag, change the calling convention first.

Signed-off-by: Harvey Harrison <eadbd6b462bf3c97df0300a934c12bc2e5d1fe51@ausenco.com>

jaamsim/jaamsim,jaamsim/jaamsim,jaamsim/jaamsim,jaamsim/jaamsim