File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
AsyncFiberWorks/Threading Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -138,14 +138,14 @@ private static int GetNextPoolId()
138138 /// <param name="callback"></param>
139139 public void Queue ( WaitCallback callback )
140140 {
141- Enqueue ( ( ) => callback ( null ) ) ;
141+ Queue ( ( ) => callback ( null ) ) ;
142142 }
143143
144144 /// <summary>
145145 /// Enqueues action.
146146 /// </summary>
147147 /// <param name="action"></param>
148- public void Enqueue ( Action action )
148+ public void Queue ( Action action )
149149 {
150150 _actions . Add ( action ) ;
151151 }
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public async Task JoinUserThreadPool()
8282 {
8383 var pool = UserThreadPool . Create ( ) ;
8484 pool . Start ( ) ;
85- pool . Enqueue ( ( ) =>
85+ pool . Queue ( ( ) =>
8686 {
8787 Thread . Sleep ( 600 ) ;
8888 pool . Stop ( ) ;
@@ -128,9 +128,9 @@ public void UseMultipleUserThreadPool()
128128 {
129129 for ( int i = 0 ; i < loopCount ; i ++ )
130130 {
131- pool1 . Enqueue ( ( ) => Interlocked . Increment ( ref counter1 ) ) ;
132- pool2 . Enqueue ( ( ) => Interlocked . Increment ( ref counter2 ) ) ;
133- pool3 . Enqueue ( ( ) => Interlocked . Increment ( ref counter3 ) ) ;
131+ pool1 . Queue ( ( ) => Interlocked . Increment ( ref counter1 ) ) ;
132+ pool2 . Queue ( ( ) => Interlocked . Increment ( ref counter2 ) ) ;
133+ pool3 . Queue ( ( ) => Interlocked . Increment ( ref counter3 ) ) ;
134134 }
135135
136136 var sw = Stopwatch . StartNew ( ) ;
You can’t perform that action at this time.
0 commit comments