(args)
| 306 | log.info(display) |
| 307 | |
| 308 | def single_compile(args): |
| 309 | obj, (src, ext) = args |
| 310 | if not _needs_build(obj, cc_args, extra_postargs, pp_opts): |
| 311 | return |
| 312 | |
| 313 | # check if we are currently already processing the same object |
| 314 | # happens when using the same source in multiple extensions |
| 315 | while True: |
| 316 | # need explicit lock as there is no atomic check and add with GIL |
| 317 | with _global_lock: |
| 318 | # file not being worked on, start working |
| 319 | if obj not in _processing_files: |
| 320 | _processing_files.add(obj) |
| 321 | break |
| 322 | # wait for the processing to end |
| 323 | time.sleep(0.1) |
| 324 | |
| 325 | try: |
| 326 | # retrieve slot from our #job semaphore and build |
| 327 | with _job_semaphore: |
| 328 | self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) |
| 329 | finally: |
| 330 | # register being done processing |
| 331 | with _global_lock: |
| 332 | _processing_files.remove(obj) |
| 333 | |
| 334 | |
| 335 | if isinstance(self, FCompiler): |
no test coverage detected