2243
2252
termios.tcsetattr(fd, termios.TCSADRAIN, settings)
2247
2255
if sys.platform == 'linux2':
2248
2256
def _local_concurrency():
2255
2261
elif sys.platform == 'darwin':
2256
2262
def _local_concurrency():
2257
2263
return subprocess.Popen(['sysctl', '-n', 'hw.availcpu'],
2258
2264
stdout=subprocess.PIPE).communicate()[0]
2260
2266
def _local_concurrency():
2261
2267
return subprocess.Popen(['sysctl', '-n', 'hw.ncpu'],
2262
2268
stdout=subprocess.PIPE).communicate()[0]