File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,12 @@ public static bool Open()
2020 string ? val = Environment . GetEnvironmentVariable ( "NETQM_SUPPRESS_RDTSC" ) ;
2121 if ( ! string . IsNullOrEmpty ( val ) )
2222 return false ;
23- #if NETSTANDARD || NET
23+
2424 if ( RuntimeInformation . ProcessArchitecture != Architecture . X86 &&
2525 RuntimeInformation . ProcessArchitecture != Architecture . X64 )
2626 {
2727 return false ; // RDTSC instruction not supported
2828 }
29- #endif
3029
3130 var p = ( int ) Environment . OSVersion . Platform ;
3231
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ public NetMQPoller()
155155
156156 // Try to dequeue and execute all pending tasks
157157 while ( m_tasksQueue . TryDequeue ( out Task ? task , TimeSpan . Zero ) )
158- TryExecuteTask ( task ! ) ;
158+ TryExecuteTask ( task ) ;
159159 } ;
160160
161161 m_sockets . Add ( ( ( ISocketPollable ) m_tasksQueue ) . Socket ) ;
@@ -639,11 +639,9 @@ private void RunPoller()
639639 }
640640 }
641641
642- #if ! NET35
643642 // Try to dequeue and execute all pending tasks before stopping poller
644643 while ( m_tasksQueue . TryDequeue ( out Task ? task , TimeSpan . Zero ) )
645- TryExecuteTask ( task ! ) ;
646- #endif
644+ TryExecuteTask ( task ) ;
647645 }
648646 finally
649647 {
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public event EventHandler<NetMQQueueEventArgs<T>> ReceiveReady
9494 /// <param name="result">Will be filled with the item upon success</param>
9595 /// <param name="timeout">Timeout to try and dequeue and item</param>
9696 /// <returns>Will return false if it didn't succeed to dequeue an item after the timeout.</returns>
97- public bool TryDequeue ( out T ? result , TimeSpan timeout )
97+ public bool TryDequeue ( [ MaybeNullWhen ( false ) ] out T result , TimeSpan timeout )
9898 {
9999 if ( m_reader . TryReceive ( ref m_dequeueMsg , timeout ) )
100100 {
You can’t perform that action at this time.
0 commit comments