The "right" way to resynchronise an asynchnronous signal into a new clock domain depends on the situation - there's no magic code example that is guaranteed to solve your specific problem. If you describe the specifics of the situation and make a reasonable attempt at providing a solution, then you'll almost certainly find some useful feedback from the community.