Tensorize in multithreaded environment

You can simply use int as return type and not use the values for void functions, and it should work