it returns boolean value depending upon whether the queue is full or not priority queue is an extension of the queue with the following propertiesan element with high priority is dequeued before an element with low priority if two elements have the same prioritythey are served according to their order in the queue below is code example explaining the process of creating multi-threaded priority queueexampleimport queue import threading import time thread_exit_flag class sample_thread (threading thread)def __init__(selfthreadidnameq)threading thread __init__(selfself threadid threadid self name name self def run(self)print ("initializing self nameprocess_data(self nameself qprint ("exiting self namehelper function to process data def process_data(threadnameq)while not thread_exit_flagqueuelock acquire(if not workqueue empty()data get(queuelock release(print (" processing (threadnamedata)elsequeuelock release(time sleep( thread_list ["thread- ""thread- ""thread- "name_list [" "" "" "" "" "