This is a complicated topic that I don't think many of the people responding actually understand. Future technology is something people always struggle with. If you were to tell people they'd be carrying tiny flat PC's in their pockets back in the 90's they'd look at you like you were crazy. Even today people still don't understand how self-driving cars and Amazon's drones are going to affect the future. That said, I believe it will be a very long time until anything "replaces" real sex. A lot of it depends on other future technologies. Ever seen Sword Art Online? Once we're able to actually enter virtual worlds ourselves (instead of being represented by an avatar) that's when things will change. When you can physically touch, feel, etc. people in the virtual world then it makes no difference whether you're in reality or not. Though I don't think "touch feedback" will be enough, so it will take many many iterations of VR before anything gets good enough for this.