| 783 | } |
| 784 | |
| 785 | static PythonSessionCtx* PythonSessionCtx_Get(const char* id){ |
| 786 | pthread_mutex_lock(&PySessionsLock); |
| 787 | PythonSessionCtx* ret = RedisModule_DictGetC(SessionsDict, (char*)id, strlen(id), NULL); |
| 788 | if (ret) { |
| 789 | ret = PythonSessionCtx_ShallowCopy(ret); |
| 790 | } |
| 791 | pthread_mutex_unlock(&PySessionsLock); |
| 792 | return ret; |
| 793 | } |
| 794 | |
| 795 | static void PythonSessionCtx_Set(PythonSessionCtx* s){ |
| 796 | pthread_mutex_lock(&PySessionsLock); |
no test coverage detected