Skip to content

Commit

Permalink
EOL whitepsace.
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes committed Jul 27, 2015
1 parent dbc382b commit e1fef58
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
6 changes: 3 additions & 3 deletions src/NetMQ/Core/IOThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ public IMailbox Mailbox
public int Load
{
get { return m_proactor.Load; }
}
}

protected override void ProcessStop()
{
{
m_proactor.Stop();
}

Expand Down
8 changes: 4 additions & 4 deletions src/NetMQ/Core/Reaper.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
/*
Copyright (c) 2011 250bpm s.r.o.
Copyright (c) 2011 Other contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
Expand Down Expand Up @@ -68,7 +68,7 @@ public Reaper([NotNull] Ctx ctx, int threadId)
{
m_sockets = 0;
m_terminating = false;

string name = "reaper-" + threadId;
m_poller = new Utils.Poller(name);

Expand Down
36 changes: 18 additions & 18 deletions src/NetMQ/Core/SocketBase.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Copyright (c) 2009-2011 250bpm s.r.o.
Copyright (c) 2007-2009 iMatix Corporation
Copyright (c) 2011 VMware, Inc.
Expand All @@ -15,7 +15,7 @@ the terms of the GNU Lesser General Public License as published by
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -116,7 +116,7 @@ protected SocketBase([NotNull] Ctx parent, int threadId, int socketId)
/// <param name="pipe">the Pipe that is being removed</param>
protected abstract void XTerminated([NotNull] Pipe pipe);

/// <summary>Throw <see cref="ObjectDisposedException"/> if this socket is already disposed.</summary>
/// <summary>Throw <see cref="ObjectDisposedException"/> if this socket is already disposed.</summary>
/// <exception cref="ObjectDisposedException">This object is already disposed.</exception>
public void CheckDisposed()
{
Expand Down Expand Up @@ -461,8 +461,8 @@ public void Bind([NotNull] string addr)
m_port = listener.Port;

// Recreate the address string (localhost:1234) in case the port was system-assigned
addr = string.Format("tcp://{0}:{1}",
address.Substring(0, address.IndexOf(':')),
addr = string.Format("tcp://{0}:{1}",
address.Substring(0, address.IndexOf(':')),
m_port);
}
catch (NetMQException ex)
Expand Down Expand Up @@ -583,11 +583,11 @@ public void Connect([NotNull] string addr)

// The total HWM for an inproc connection should be the sum of
// the binder's HWM and the connector's HWM.
var sndhwm = m_options.SendHighWatermark != 0 && peer.Options.ReceiveHighWatermark != 0
var sndhwm = m_options.SendHighWatermark != 0 && peer.Options.ReceiveHighWatermark != 0
? m_options.SendHighWatermark + peer.Options.ReceiveHighWatermark
: 0;

var rcvhwm = m_options.ReceiveHighWatermark != 0 && peer.Options.SendHighWatermark != 0
var rcvhwm = m_options.ReceiveHighWatermark != 0 && peer.Options.SendHighWatermark != 0
? m_options.ReceiveHighWatermark + peer.Options.SendHighWatermark
: 0;

Expand Down Expand Up @@ -643,7 +643,7 @@ public void Connect([NotNull] string addr)

if (ioThread == null)
throw NetMQException.Create(ErrorCode.EmptyThread);

var paddr = new Address(protocol, address);

// Resolve address (if needed by the protocol)
Expand Down Expand Up @@ -761,7 +761,7 @@ public void TermEndpoint([NotNull] string addr)
{
if (UnregisterEndpoint(addr, this))
return;

Pipe pipe;
if (!m_inprocs.TryGetValue(addr, out pipe))
throw new EndpointNotFoundException("Endpoint was not found and cannot be disconnected");
Expand Down Expand Up @@ -814,12 +814,12 @@ public bool TrySend(ref Msg msg, TimeSpan timeout, bool more)
if (isMessageSent)
return true;

// In case of non-blocking send we'll simply return false
// In case of non-blocking send we'll simply return false
if (timeout == TimeSpan.Zero)
return false;

// Compute the time when the timeout should occur.
// If the timeout is infinite, don't care.
// If the timeout is infinite, don't care.
int timeoutMillis = (int)timeout.TotalMilliseconds;
long end = timeoutMillis < 0 ? 0 : (Clock.NowMs() + timeoutMillis);

Expand All @@ -831,15 +831,15 @@ public bool TrySend(ref Msg msg, TimeSpan timeout, bool more)
ProcessCommands(timeoutMillis, false);

isMessageSent = XSend(ref msg);

if (isMessageSent)
break;

if (timeoutMillis <= 0)
continue;

timeoutMillis = (int)(end - Clock.NowMs());

if (timeoutMillis <= 0)
return false;
}
Expand All @@ -860,11 +860,11 @@ public bool TrySend(ref Msg msg, TimeSpan timeout, bool more)
/// <item>Positive - return <c>false</c> after the corresponding duration if no message has become available</item>
/// <item>Negative - wait indefinitely, always returning <c>true</c></item>
/// </list>
/// </remarks>
/// </remarks>
/// <exception cref="FaultException">the Msg must already have been uninitialised</exception>
/// <exception cref="TerminatingException">The socket must not already be stopped.</exception>
public bool TryRecv(ref Msg msg, TimeSpan timeout)
{
{
CheckContextTerminated();

// Check whether message passed to the function is valid.
Expand Down Expand Up @@ -905,7 +905,7 @@ public bool TryRecv(ref Msg msg, TimeSpan timeout)
m_ticks = 0;

isMessageAvailable = XRecv(ref msg);

if (!isMessageAvailable)
return false;

Expand All @@ -914,7 +914,7 @@ public bool TryRecv(ref Msg msg, TimeSpan timeout)
}

// Compute the time when the timeout should occur.
// If the timeout is infinite (negative), don't care.
// If the timeout is infinite (negative), don't care.
int timeoutMillis = (int)timeout.TotalMilliseconds;
long end = timeoutMillis < 0 ? 0L : Clock.NowMs() + timeoutMillis;

Expand Down Expand Up @@ -1018,7 +1018,7 @@ private void ProcessCommands(int timeout, bool throttle)
// If we are asked not to wait, check whether we haven't processed
// commands recently, so that we can throttle the new commands.

// Get the CPU's tick counter. If 0, the counter is not available.
// Get the CPU's tick counter. If 0, the counter is not available.
long tsc = Clock.Rdtsc();

// Optimised version of command processing - it doesn't have to check
Expand Down
22 changes: 11 additions & 11 deletions src/NetMQ/Core/YPipe.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Copyright (c) 2009-2011 250bpm s.r.o.
Copyright (c) 2007-2009 iMatix Corporation
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
Expand Down Expand Up @@ -32,24 +32,24 @@ internal sealed class YPipe<T>
/// Front of the queue points to the first prefetched item, back of
/// the pipe points to last un-flushed item. Front is used only by
/// reader thread, while back is used only by writer thread.
/// </summary>
/// </summary>
private readonly YQueue<T> m_queue;

/// <summary>
/// Points to the first un-flushed item. This variable is used
/// exclusively by writer thread.
/// </summary>
/// </summary>
private int m_flushFromIndex;

/// <summary>
/// Points to the first un-prefetched item. This variable is used
/// exclusively by reader thread.
/// </summary>
/// </summary>
private int m_readToIndex;

/// <summary>
/// Points to the first item to be flushed in the future.
/// </summary>
/// </summary>
private int m_flushToIndex;

#if DEBUG
Expand All @@ -61,7 +61,7 @@ internal sealed class YPipe<T>
/// Points past the last flushed item. If it is NULL,
/// reader is asleep. This pointer should be always accessed using
/// atomic operations.
/// </summary>
/// </summary>
private int m_lastAllowedToReadIndex;

public YPipe(int qsize, string name)
Expand All @@ -78,7 +78,7 @@ public YPipe(int qsize, string name)
/// set to true the item is assumed to be continued by items
/// subsequently written to the pipe. Incomplete items are never
/// flushed down the stream.
/// </summary>
/// </summary>
public void Write(ref T value, bool incomplete)
{
// Place the value to the queue, add new terminator element.
Expand All @@ -93,8 +93,8 @@ public void Write(ref T value, bool incomplete)

/// <summary>
/// Pop an incomplete item from the pipe.
/// </summary>
/// <returns>the element revoked if such item exists, <c>null</c> otherwise.</returns>
/// </summary>
/// <returns>the element revoked if such item exists, <c>null</c> otherwise.</returns>
public bool Unwrite(ref T value)
{
if (m_flushToIndex == m_queue.BackPos)
Expand Down Expand Up @@ -139,7 +139,7 @@ public bool Flush()

/// <summary>
/// Check whether item is available for reading.
/// </summary>
/// </summary>
public bool CheckRead()
{
// Was the value prefetched already? If so, return.
Expand Down Expand Up @@ -176,7 +176,7 @@ public bool CheckRead()
/// <summary>
/// Reads an item from the pipe. Returns false if there is no value.
/// available.
/// </summary>
/// </summary>
public bool Read(out T value)
{
// Try to prefetch a value.
Expand Down

0 comments on commit e1fef58

Please sign in to comment.