The Massachusetts handbook [1] says:
> Use your rearview mirror, check your blind spots, and use your directional signals when changing lanes. Remember these three steps: (1) look, (2) signal, (3) move
To me this means you don't signal until it's actually safe to merge. E.g. if a car is passing me at high speed, I wouldn't turn on my signal until after they had passed. If I did it before they pass, they might think my intent is to merge in front of them, and slam on their brakes, move into a different lane, etc.
In Japan [2] the process is 1) check rearview and side mirrors, 2) turn on blinker at least 3 seconds before turn, 3) while the blinker is on, do a shoulder check for blind spots 4) merge, 5) flash your hazards 2-3 times to thank the driver who let you merge.
So you're also checking for safety before signaling. Step 5 isn't actually required by the way but it's quite common and a nice touch I think.
These are of course cases where you have the option of moving into a faster lane at your discretion. If your lane is coming to an end, you should probably signal well before the end of the lane (although I would still wait to get up to speed before signaling).
[1] https://www.mass.gov/doc/english-drivers-manual/download Page 95
[2] https://groups.oist.jp/ja/resource-center/things-remember-pr...
Flashing your hazards to thank somebody isn't something I've even seen officially recommended and I see it more as a nuisance in most cases. The communication can't really be unambiguously understood as a "thanks", especially not if you do it for more than one flash.
It's something I personally do about once in a hundred passes if I think somebody really went out of their way to accommodate me, but even then I realize it's detracting from road safety in several ways, such as reaching over to the often awkwardly placed button, and perhaps confusing other drivers.
But I suppose it's a cultural thing, I've heard that in India it's common to use the horn to notify other drivers of your presence even though there's no imminent danger. Which is something that in most other countries would be seen as obnoxious.