MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / run

Method run

python/tutorial/MyGNode/MyWriteParamNode.py:17–25  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

15 return self.createGParam(MyParam(), "param1")
16
17 def run(self):
18 param: MyParam = self.getGParam("param1")
19 with param:
20 # user `with param` to enter thread safe area for param's info change
21 # as same as param.lock() and param.unlock()
22 param.count += 1
23 param.value += 1
24 print('[{0}] value is {1}, count is {2}'.format(self.getName(), param.value, param.count))
25 return CStatus()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected