summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2017-03-23 08:47:11 +0100
committerGitHub <noreply@github.com>2017-03-23 08:47:11 +0100
commitf2c6005f3def940db3897f94b8ba4f0fe2fbd8f4 (patch)
tree3cc763a3e613e706c5b282ff56721a862ad57cb6 /src
parent0f1b63536b6a20e3d68062e4fcf35f0c68561e04 (diff)
parentf171c5115508700d1b700c07c454d06295484448 (diff)
downloadscala-f2c6005f3def940db3897f94b8ba4f0fe2fbd8f4.tar.gz
scala-f2c6005f3def940db3897f94b8ba4f0fe2fbd8f4.tar.bz2
scala-f2c6005f3def940db3897f94b8ba4f0fe2fbd8f4.zip
Merge pull request #5797 from jrudolph/patch-1
Improve List creation in BatchingExecutor
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/concurrent/BatchingExecutor.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/concurrent/BatchingExecutor.scala b/src/library/scala/concurrent/BatchingExecutor.scala
index a0d7aaea47..fd31f3470e 100644
--- a/src/library/scala/concurrent/BatchingExecutor.scala
+++ b/src/library/scala/concurrent/BatchingExecutor.scala
@@ -103,7 +103,7 @@ private[concurrent] trait BatchingExecutor extends Executor {
override def execute(runnable: Runnable): Unit = {
if (batchable(runnable)) { // If we can batch the runnable
_tasksLocal.get match {
- case null => unbatchedExecute(new Batch(List(runnable))) // If we aren't in batching mode yet, enqueue batch
+ case null => unbatchedExecute(new Batch(runnable :: Nil)) // If we aren't in batching mode yet, enqueue batch
case some => _tasksLocal.set(runnable :: some) // If we are already in batching mode, add to batch
}
} else unbatchedExecute(runnable) // If not batchable, just delegate to underlying