Add type THREAD.
Merge branch 'dev' into compiler