Something similar
The only time my engine has ever gone out on me has been while sitting comfortably tied up alongside at the marina. However:Last summer, on the first day of a planned five day trip up to the San Juan's from Seattle, we had just left our marina on Lake Union, motored all of a couple hundred yards to the Fremont Bridge, and when I pushed the transmission lever into forward to pass under it, I heard a "Sproing!" from below and it went all floppy in my hand. And the engine continued to run merrily along in neutral.By the time I wrapped my head around this (didn't take too long--transmission had either gone out or the cable snapped, probably the latter), residual motion had carried us under the open bridge, where we promptly stopped, our mast jutting up between the open leaves. I raced below to try to shift the transmission manually, but the lever is on the opposite side of the engine from the access panel and I couldn't reach. I got on the horn with the bridge operator and made sure she saw us and wasn't about to close on top of us--she wasn't happy about it, with cars piling up on both sides of the bridge by then, but she didn't have much choice either. With the restricted channel there--especially pinned in between the bridge leaves--there was no room to sail out, even if there had been much of a breeze.Fortunately, as I finished up that unpleasant conversation, I spotted a large cabin cruiser motoring up the channel in the opposite direction, so I ran up onto the foredeck and hailed him. Without missing a beat he swung in close, had a friend on board heave us a line, and towed us out from beneath the bridge and back to the nearby Morrison's fuel dock. There, I was able to clear out the cockpit locker enough to get down inside and shift into gear and we motored back to the marina and I spent our five day vacation replacing the busted transmission cable (which, as suspected, had snapped inside the binnacle).I had plenty of time to think about what I should have or might have done in that situation or similar as I was crawling around replacing the cable, but I think what actually happened was one of the better scenarios. Given more space (time), I might have put my skinny girlfriend down the cockpit locker and called out the shifting manually, or made a call to the local police (their Harbor patrol dock is all of 200 yards from the bridge) for assistance. If current had been a problem, I might have drifted clear of the immediate issue (the bridge) and dropped anchor while troubleshooting or waiting for help.As someone else said, it's situational--I was in a busy waterway with a lot of potential assistance nearby, and far enough to the side of the channel that dropping anchor would have been safe on a sunny day with good visibility, and I started out with a pretty good idea what had gone wrong and how it might be fixed, which dramatically decreases your troubleshooting time. But simply sailing out of a problem isn't always an option and it's worth thinking through other approaches to power and steerage issues if you haven't--those answers to this question which only involved "Raise sail and get out of the channel" get failing grades in my book (and in that experience).