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