Py_ALLOW_THREADS

D's answer to C's

Py_BEGIN_ALLOW_THREADS
..code..
Py_END_ALLOW_THREADS

is

mixin(Py_ALLOW_THREADS(q{
..code..
}));
extern (C)
string
Py_ALLOW_THREADS
()
(
string inner_code
)

Meta