Permalink
Browse files

Add a warning about SingleThreadEventExecutor.pendingTasks() operation

  • Loading branch information...
1 parent 0efebd5 commit da174f4290278c390aa815e3decf0e6ff90d41d0 @normanmaurer normanmaurer committed Apr 9, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java
@@ -262,6 +262,9 @@ protected boolean hasTasks() {
/**
* Return the number of tasks that are pending for processing.
+ *
+ * <strong>Be aware that this operation may be expensive as it depends on the internal implementation of the
+ * SingleThreadEventExecutor. So use it was care!</strong>
*/
public final int pendingTasks() {
return taskQueue.size();

0 comments on commit da174f4

Please sign in to comment.