AsyncQueue.pushSortedUnlocked
void pushSortedUnlocked(void * data, glib.types.CompareDataFunc func)Inserts data into queue using func to determine the new position.
The sort function func is passed two elements of the queue. It should return 0 if they are equal, a negative value if the first element should be higher in the queue or a positive value if the first element should be lower in the queue than the second element.
This function requires that the queue is sorted before pushing on new elements, see [glib.async_queue.AsyncQueue.sort].
This function must be called while holding the queue's lock.
For an example of func see [glib.async_queue.AsyncQueue.sort].
Parameters
data | the data to push into the queue |
func | the #GCompareDataFunc is used to sort queue |