I understand how to set the parallelism level for a single parallel collection, via the mutable tasksupport
field (c.f. https://stackoverflow.com/a/5425354/82970).
How can I set the parallelism level for all new parallel collections in Scala 2.10?
A subsidiary question --- is the tasksupport
associated to a parallel collection 'inherited' by new parallel collections built out of it? (e.g. with take
, map
, etc.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…