mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
doubleclick: sanity check re multiple contexts
This commit is contained in:
parent
c78ac67ba9
commit
96b1c08804
1 changed files with 9 additions and 1 deletions
|
|
@ -100,7 +100,15 @@ def _ctx_pushing_class(cls):
|
||||||
try:
|
try:
|
||||||
cls.invoke(self, ctx)
|
cls.invoke(self, ctx)
|
||||||
finally:
|
finally:
|
||||||
_ctx_stack.pop()
|
new_ctx = _ctx_stack.pop()
|
||||||
|
if new_ctx is not ctx:
|
||||||
|
raise RuntimeError(
|
||||||
|
'While doubleclick is supposed to make writing '
|
||||||
|
'threaded applications easier, it removes thread '
|
||||||
|
'safety from click. It is therefore not recommended '
|
||||||
|
'to launch more than one doubleclick application per '
|
||||||
|
'process.'
|
||||||
|
)
|
||||||
|
|
||||||
return ContextPusher
|
return ContextPusher
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue