to code the ioinject_thread.cpp complete