push_sorted_unlocked


Description:

[ Version ( since = "2.10" ) ]
public void push_sorted_unlocked (owned G data, CompareDataFunc<G> func)

Inserts data into this using func to determine the new position.

The sort function func is passed two elements of the this. It should return 0 if they are equal, a negative value if the first element should be higher in the this or a positive value if the first element should be lower in the this than the second element.

This function requires that the this is sorted before pushing on new elements, see sort.

This function must be called while holding the this's lock.

For an example of func see sort.

Parameters:

this

a AsyncQueue

data

the data to push into the this

func

the CompareDataFunc is used to sort this

user_data

user data passed to func.