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