Browse Source

make sure that we have the lock here...

main
John-Mark Gurney 4 years ago
parent
commit
954ab3efbd
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      bitelab/__init__.py

+ 2
- 0
bitelab/__init__.py View File

@@ -132,6 +132,8 @@ class BoardImpl:
self.reserved = False self.reserved = False


async def update_attrs(self, **attrs): async def update_attrs(self, **attrs):
assert self.lock.locked() and self.reserved

for i in attrs: for i in attrs:
self.attrcache[i] = await self.attrmap[i].setvalue(attrs[i]) self.attrcache[i] = await self.attrmap[i].setvalue(attrs[i])




Loading…
Cancel
Save