Does setting boundaries with women actually work? Or has it worked for you?

For example, say she wants to be friends with her ex again and you tell her that's not happening or she can take a hike.
Will she actually respect your boundaries, or will she just pretend to agree and go do it anyway behind your back?

(I'm taking about the type of girl who would think that's ok to begin with. I know all women aren't the same)
Updates
10 mo
So I just talked to her about it, and I have to say she was really cool about it. I may or may not have threatened to kick his ass, and that may or may not have turned her on a little
Does setting boundaries with women actually work? Or has it worked for you?
Post Opinion