There's no legal requirement that you can't receive a divorce until your home sells. However, a depressed real estate market can certainly make it difficult for spouses to end their marriage and move on. If you just can't find a buyer, you may have to get creative. You have options, but not all of them are attractive.
If the house won't sell, one spouse always has the option of keeping it instead, provided he can qualify to refinance the mortgage on his income alone. The spouse who doesn't keep the house is entitled to half its equity -- the difference between the mortgage and the home's appraised value. The other spouse would have to qualify for a mortgage large enough to pay off the existing loan, plus half the home's equity, which he can then use to buy out his partner's interest in the property. If he can't qualify for a loan that large, he can relinquish other assets equal in value to half the home's equity.
You and your spouse can also elect to co-own your home after your divorce, at least until a buyer comes along. You can wait out the market by renting the property to a third party, or one of you can continue to live there, assuming responsibility for the mortgage payments and related expenses. If your divorce is amicable enough, you can both continue to live there and share the mortgage and expenses. However, you should include language in your marital settlement agreement clearly stating how you're going to handle co-ownership until you can find a buyer.
If you've listed your home at $330,000 because the mortgage against it is $300,000 and you both want to walk away from the sale with some cash to start over, you can consider accepting less to hasten things along. Your home might not sell for $330,000, but it might sell for $320,000 or even $310,000. You'll have less cash with which to begin a new life, but you won't be tied to your ex any longer.
If your home isn't selling because it's underwater -- its value is less than the mortgage against it -- you might be able to work out a deal with your mortgage lender to allow a short sale. This involves the lender accepting less than your mortgage balance and writing off the deficiency. If your mortgage balance is $300,000, and if a buyer offers $275,000, your lender would permit you to sell the home for this price and would forgive the $25,000 shortfall. This option will damage your credit, but it may not hurt it quite as badly as just walking away from the house and letting the mortgage lender foreclose.