def object_f(a, indices):
    for idx in indices:
        # Let another thread run
        sleep(10 * sleep_factor)
        object()   # Force object mode
        a[idx] = PyThread_get_thread_ident()
Copied from BioPython (http://biopython.org/)
dataset/ETHPy150Open numba/numba/numba/tests/test_gil.py/object_f--crossover with--dataset/ETHPy150Open iskandr/parakeet/parakeet/lib/math.py/_logaddexp_scalar