This paper considers a discrete-time single-server queueing system, with two classes of customers, named class 1 and class 2. We propose and analyze a novel threshold-based priority scheduling scheme that works as follows. Whenever the number of class-1 customers in the system exceeds a given threshold \(m \ge 0\) , the server of the system gives priority to class-1 customers; otherwise, it gives priority to class-2 customers. Consequently, for \(m=0\) , the system is equivalent to a classical priority queue with absolute priority for class-1 customers, whereby the (mean) delay of class-1 customers is lowered as much as possible at the expense of longer (mean) delays for class-2 customers. On the other hand, for \(m\rightarrow \infty \) , the system is equivalent to a priority queue with absolute priority for class-2 customers, with the opposite effect on the class-specific (mean) delays. By choosing \(0<m<\infty \) , we aim at a more gradual delay differentiation between the two customer classes of the system. The queueing analysis of the model turns out to be quite challenging. We first establish a kernel-type functional equation for the steady-state joint probability generating function \(U(z_1,z_2)\) of the numbers of customers in the two queues, from which \(U(z_1,z_2)\) can be solved in terms of a finite number of unknown boundary functions. Next, we develop a method to determine these boundary functions in principle and discuss the main practical obstacles in deriving explicit results from this. We show that the difficulty of a full analysis depends heavily on the value of m and the precise form of the arrival process. For the special case \(m=1\) , we derive explicit formulas for \(U(z_1,z_2)\) . We also develop a mean-value analysis technique, applicable for any m, to compute closed-from expressions for the class-specific mean customer delays. Abundant numerical results demonstrate the impact of the threshold m and the traffic mix (proportion of class-1 and class-2 traffic in the arrival process) on the delay-differentiating capabilities of the proposed scheduling discipline.