Skip to content

Conversation

James-E-A
Copy link
Contributor

@James-E-A James-E-A commented Nov 3, 2023

Is there any real reason this wasn't added yet?

from cffi import FFI

ffibuilder = FFI()
...
# pass parallel=n to use that many threads,
# or parallel=True to automatically use os.cpu_count()
# https://github.com/python/cpython/blob/v3.5.0/Lib/distutils/command/build_ext.py#L449
# https://github.com/pypa/setuptools/blob/v66.1.0/setuptools/_distutils/command/build_ext.py#L470
ffibuilder.compile(verbose=True, parallel=True)

@arigo
Copy link
Contributor

arigo commented Nov 3, 2023

Looks reasonable to me. It's missing tests and documentation for all public methods with the new parallel keyword argument. (For tests I'd be happy with just making sure there is at least one test somewhere that gives some value to parallel, and one that doesn't, and both passes.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants