Skip to content

Commit ff78430

Browse files
committed
Move null check into FEATURE_THREAD_THREADPOOL section.
1 parent 04ca231 commit ff78430

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Renci.SshNet/Abstractions/ThreadAbstraction.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ public static void ExecuteThreadLongRunning(Action action)
3636
/// <param name="action">The action to execute.</param>
3737
public static void ExecuteThread(Action action)
3838
{
39+
#if FEATURE_THREAD_THREADPOOL
3940
if (action == null)
4041
throw new ArgumentNullException("action");
41-
#if FEATURE_THREAD_THREADPOOL
42+
4243
System.Threading.ThreadPool.QueueUserWorkItem(o => action());
4344
#elif FEATURE_THREAD_TAP
4445
System.Threading.Tasks.Task.Run(action);

0 commit comments

Comments
 (0)