本文整理汇总了Python中java.util.Collections.newSetFromMap方法的典型用法代码示例。如果您正苦于以下问题:Python Collections.newSetFromMap方法的具体用法?Python Collections.newSetFromMap怎么用?Python Collections.newSetFromMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.util.Collections
的用法示例。
在下文中一共展示了Collections.newSetFromMap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: int
# 需要导入模块: from java.util import Collections [as 别名]
# 或者: from java.util.Collections import newSetFromMap [as 别名]
SF_LINEAR_LIMIT = 1024*1024
else:
SF_LINEAR_LIMIT = int(System.getProperty("sython.linear_limit"))
# Maximum recursion depth of stealing
SF_MAX_STEAL = 64
# A thread pool used for the executors
SF_POOL = Executors.newCachedThreadPool()
# A set of tasks which might be available for stealing. Use a concurrent set so
# that it shares information between threads in a stable and relatively
# efficient way. Note that a task being in this set does not guarantee it is
# not being executed. A locking flag on the 'superFuture' task management
# objects disambiguates this to prevent double execution.
SF_PENDING = Collections.newSetFromMap(ConcurrentHashMap(SF_MAX_CONCURRENT*128,0.75,SF_MAX_CONCURRENT+1))
# All parallel jobs get a job number which is globally unique
# and increasing. This is used for logging and cycle checking
# and any other house keeping which requires a unique id across
# jobs.
SF_JOB_NUMB = AtomicLong()
# Tracks how many threads are waiting for other threads
SF_NWAITING = AtomicLong()
# EXECUTION
# =========
# Force 'nice' interleaving when logging from multiple threads