<div dir="ltr">Hello list,<div><br></div><div>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.</div>
<div><br></div><div>Here's what I think is happening:</div><div><br></div><div>Suppose I send 3 consecutive requests:</div><div><br></div><div>The script adds them in the "queue" variable as: [1, 2, 3]</div>
<div><br></div><div style>but in start we are doing:</div><div style><br></div><div style><div>           while (queue.length > 0) {</div><div>                socket.send(queue.pop());</div><div>            }</div></div>
<div><div><br></div><div style>so, we send the requests in order:</div><div style>3, 2, 1</div><div style><br></div><div style>Hence, the last request made later gets the first priority.</div><div style>Is this intended by design?</div>
-- <br>Thanks<br>Aneesh Dogra (lionaneesh)
</div></div>