| 2135 | } |
| 2136 | |
| 2137 | static PyObject* atomicExit(PyObject *self, PyObject *args){ |
| 2138 | PythonThreadCtx* ptctx = GetPythonThreadCtx(); |
| 2139 | if(!(ptctx->flags & PythonThreadCtxFlag_InsideAtomic)){ |
| 2140 | PyErr_SetString(GearsError, "Not inside an atomic block"); |
| 2141 | return NULL; |
| 2142 | } |
| 2143 | ptctx->flags &= ~PythonThreadCtxFlag_InsideAtomic; |
| 2144 | PyAtomic* pyAtomic = (PyAtomic*)self; |
| 2145 | if (redisVersion->redisMajorVersion < 7) { |
| 2146 | /* see comment on atomicEnter */ |
| 2147 | RedisModule_Replicate(pyAtomic->ctx, "exec", ""); |
| 2148 | } |
| 2149 | RedisGears_LockHanlderRelease(pyAtomic->ctx); |
| 2150 | Py_INCREF(Py_None); |
| 2151 | return Py_None; |
| 2152 | } |
| 2153 | |
| 2154 | // LCOV_EXCL_START |
| 2155 |
nothing calls this directly
no test coverage detected