This paper studies a double-ended queue with four Poisson inputs and flexible customers, and its stability is guaranteed by customers’ impatient behavior. We show that such a queue can be expressed as a quasi birth-and-death (QBD) process with infinitely many phases. For this purpose, we provide a detailed analysis for the QBD process, including the system stability, the stationary probability vector, the sojourn time, and so forth. Finally, numerical examples are employed to verify the correctness of our theoretical results, and demonstrate how the performance measures of this queue are influenced by key system parameters. We believe that the methodology and results described in this paper can be applied to analyze many practical issues, such as those encountered in sharing economy, organ transplantation, employee recruitment, onlinedating, and so on.