MCPcopy Create free account
hub / github.com/baidu/tera / async_put

Function async_put

src/sdk/python/sample.py:156–166  ·  view source on GitHub ↗

async put

(table)

Source from the content-addressed store, hash-verified

154
155
156def async_put(table):
157 """ async put """
158 print("\nasync put")
159 rowkey_list = ["async"]
160 for key in rowkey_list:
161 mu = table.NewRowMutation(key)
162 mu.Put("cf0", "qu0", "value")
163 mu.SetCallback(write_callback)
164 table.ApplyMutation(mu)
165 while not table.IsPutFinished():
166 time.sleep(0.01)
167
168
169def async_get(table):

Callers 1

mainFunction · 0.85

Calls 5

NewRowMutationMethod · 0.45
PutMethod · 0.45
SetCallbackMethod · 0.45
ApplyMutationMethod · 0.45
IsPutFinishedMethod · 0.45

Tested by

no test coverage detected