Properly pass comparator to priority queue
There was a bug before where our Nonblocking.Mailbox's priority queue wasn't actually being created correctly. This fixes that. Sounds like this might affect lots of things, especially the order in which the background fetcher syncs folders.
This commit is contained in:
parent
b3a672f6cf
commit
2005e4553c
1 changed files with 2 additions and 2 deletions
|
|
@ -12,12 +12,12 @@ public class Geary.Nonblocking.Mailbox<G> : BaseObject {
|
|||
private Gee.Queue<G> queue;
|
||||
private Nonblocking.Spinlock spinlock = new Nonblocking.Spinlock();
|
||||
|
||||
public Mailbox(CompareFunc<G>? comparator = null) {
|
||||
public Mailbox(owned CompareDataFunc<G>? comparator = null) {
|
||||
// can't use ternary here, Vala bug
|
||||
if (comparator == null)
|
||||
queue = new Gee.LinkedList<G>();
|
||||
else
|
||||
queue = new Gee.PriorityQueue<G>();
|
||||
queue = new Gee.PriorityQueue<G>((owned) comparator);
|
||||
}
|
||||
|
||||
public bool send(G msg) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue