@ryanscripts even if its deprecated you can still use it, but keep in mind that it changes only header, not internal user-agent like in navigator and etc
Each asynchronous function started, starts in separate thread.
So in that example you will have 2 threads since 2 asynchronous functions
will be started, each with its own (different) script.