Skip to content

Commit f2c6005

Browse files
authored
Merge pull request scala#5797 from jrudolph/patch-1
Improve List creation in BatchingExecutor
2 parents 0f1b635 + f171c51 commit f2c6005

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library/scala/concurrent/BatchingExecutor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private[concurrent] trait BatchingExecutor extends Executor {
103103
override def execute(runnable: Runnable): Unit = {
104104
if (batchable(runnable)) { // If we can batch the runnable
105105
_tasksLocal.get match {
106-
case null => unbatchedExecute(new Batch(List(runnable))) // If we aren't in batching mode yet, enqueue batch
106+
case null => unbatchedExecute(new Batch(runnable :: Nil)) // If we aren't in batching mode yet, enqueue batch
107107
case some => _tasksLocal.set(runnable :: some) // If we are already in batching mode, add to batch
108108
}
109109
} else unbatchedExecute(runnable) // If not batchable, just delegate to underlying

0 commit comments

Comments
 (0)