MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / inner

Method inner

test/base/test_concurrency.py:146–164  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

144 var.set(val)
145
146 def inner(val):
147 retval = await_(async_inner(val))
148 eq_(val, var.get())
149 eq_(retval, val)
150
151 # set the value in a sync function
152 newval = val + concurrency
153 var.set(newval)
154 syncset = await_(async_inner(newval))
155 eq_(newval, var.get())
156 eq_(syncset, newval)
157
158 # set the value in an async function
159 retval = val + 2 * concurrency
160 await_(async_set(retval))
161 eq_(var.get(), retval)
162 eq_(await_(async_inner(retval)), retval)
163
164 return retval
165
166 async def task(val):
167 await asyncio.sleep(random.uniform(0.005, 0.015))

Callers

nothing calls this directly

Calls 4

await_Function · 0.90
eq_Function · 0.90
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected