sampad1370 / lidgren-network-gen3

Automatically exported from code.google.com/p/lidgren-network-gen3
0 stars 0 forks source link

NetQueue.TryDequeue #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Change it from 'public T TryDequeue()' to 'public bool TryDequeue(out T value)'

It conforms to ConcurrentQueue.TryDequeue method allowing easier migration if 
one needs.

Also this makes code cleaner with simpler check.

E.g.
NetSending uncSend;
while ((uncSend = m_unsentUnconnectedMessage.TryDequeue()) != null)
==>

NetSending uncSend;
while (m_unsentUnconnectedMessage.TryDequeue(out uncSend))

Original issue reported on code.google.com by NN1436401@gmail.com on 5 Sep 2010 at 9:25

GoogleCodeExporter commented 9 years ago
Good idea. Changed in rev 111

Original comment by lidg...@gmail.com on 5 Sep 2010 at 10:38