You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-06 02:11:06 +09:00
NetQueue.TryDequeue failure will now only throw in DEBUG
WaitMessage will now create a wait event object if needed
This commit is contained in:
@@ -193,6 +193,15 @@ namespace Lidgren.Network
|
||||
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
#if DEBUG
|
||||
throw;
|
||||
#else
|
||||
item = default(T);
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
finally
|
||||
{
|
||||
m_lock.ExitWriteLock();
|
||||
@@ -200,7 +209,7 @@ namespace Lidgren.Network
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an item from the head of the queue, or returns default(T) if empty
|
||||
/// Gets all items from the head of the queue, or returns number of items popped
|
||||
/// </summary>
|
||||
public int TryDrain(IList<T> addTo)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user