How can i do something like multi threathing in arduino?

Keep it simple. Have a look at the demo Several Things at a Time

...R