Message313453
> Ideally, if we don't have to do any work to reacquire the GIL, we shouldn't do any work to preserve the error code either.
Before take_gil() knows whether it has to do any work, it calls MUTEX_LOCK(_PyRuntime.ceval.gil.mutex), which is either EnterCriticalSection() or AcquireSRWLockExclusive(). So unless we can be sure that those functions can't clobber the last error (or we redesign GIL to have a fast-path like an atomic compare-exchange in non-contended case), I don't see how we can avoid the last error bookkeeping. |
|
Date |
User |
Action |
Args |
2018-03-08 18:42:45 | izbyshev | set | recipients:
+ izbyshev, paul.moore, tim.golden, zach.ware, steve.dower |
2018-03-08 18:42:45 | izbyshev | set | messageid: <1520534565.61.0.467229070634.issue33030@psf.upfronthosting.co.za> |
2018-03-08 18:42:45 | izbyshev | link | issue33030 messages |
2018-03-08 18:42:45 | izbyshev | create | |
|