The 3rd Dark Tower book by Stephen King. The Waste Lands. Came out in 1991 and ends with the main characters trapped on a psychotic AI monorail who challenges them to a riddle contest for their lives.
The fourth book, Wizard and Glass, wouldn't come out until 1997. SIX YEARS LATER.
Now, with any other author, it wouldn't be a big deal, but this is Stephen King we're talking about.
Between book 3 and book 4 he published 8 OTHER books.
Needful Things
Gerald's Game
Dolores Claiborne
Insomnia
Rose Madder
The Green Mile
Desperation
The Regulators
Of those, Insomnia, Rose Madder, Desperation and the Regulators touched on the Dark Tower universe, so it's like he was fucking with us. ;)
Book 4 finally comes out, he promises to write books 5, 6 and 7 "without getting up to go to the bathroom", and he gets hit by an idiot in a van and is damn near killed.
https://en.m.wikipedia.org/wiki/Stephen_King
The 5th book wouldn't appear until 2003, naturally after King wrote five other books, but at least 4 didn't have a cliffhanger.