Good catch. By design ordering should be preserved, so this needs fixing. On Saturday, 18 May 2013, Aneesh Dogra wrote:
> Hello list, > > I was just looking over some code in bus.js and I noticed that we are > actually using a stack to prioritize and keep track of our send requests. > The array which you name as "queue" is actually used as a stack. > > Here's what I think is happening: > > Suppose I send 3 consecutive requests: > > The script adds them in the "queue" variable as: [1, 2, 3] > > but in start we are doing: > > while (queue.length > 0) { > socket.send(queue.pop()); > } > > so, we send the requests in order: > 3, 2, 1 > > Hence, the last request made later gets the first priority. > Is this intended by design? > -- > Thanks > Aneesh Dogra (lionaneesh) > -- Daniel Narvaez
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel