A method of operating a network device is provided that includes receiving a message, determining whether the message is associated with a known
label-switched path (LSP), enqueuing the message in a first
queue on the network device in response to determining that the message is associated with a known
label-switched path, and enqueuing the message in a second
queue, different than the first
queue, on the network device subsequent to determining that the message is associated with an unknown
label-switched path. The method can further include determining whether there are any messages associated with a known label-switched path enqueued in the first queue and continuously
processing messages associated with the known label-switched path before either a message is dequeued from the second queue or the program yields to allow other pending workloads or processes to run.