Implemented the nx_thread object for unix-systems.