It rarely works.
It's just not feasible... do you just toss aside all the emotion that comes out during sex next time you see each other, and ignore it? Is the person acting colder going to offend the person who is a little more attached? And are both of you REALLY that comfortable having sex for its own sake, rather than as an expression of love?
It's hard to have both a sexual and non-sexual relationship, with the same person, at the same time.
99% of the time, you aren't going to be dealing with that the same way.
And someone will get their feelings hurt.