File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ public Task<bool> ContainsAsync(Socket socket)
408
408
#endregion
409
409
410
410
#region Start / Stop
411
-
411
+
412
412
/// <summary>
413
413
/// Runs the poller in a background thread, returning once the poller has started.
414
414
/// </summary>
@@ -424,15 +424,16 @@ public void RunAsync()
424
424
/// Runs the poller in a background thread, returning once the poller has started.
425
425
/// </summary>
426
426
/// <param name="threadName">The thread name to use.</param>
427
- public void RunAsync ( string threadName )
427
+ /// <param name="foregroundPoller">Allow the poller thread to be a foreground thread/background.</param>
428
+ public void RunAsync ( string threadName , bool foregroundPoller = true )
428
429
{
429
430
CheckDisposed ( ) ;
430
431
if ( IsRunning )
431
432
throw new InvalidOperationException ( "NetMQPoller is already running" ) ;
432
433
433
434
var thread = new Thread ( Run ) {
434
435
Name = threadName ,
435
- IsBackground = true
436
+ IsBackground = ! foregroundPoller
436
437
} ;
437
438
thread . Start ( ) ;
438
439
You can’t perform that action at this time.
0 commit comments