Skip to content

Commit df843d0

Browse files
committed
Update comment about async render_fn function in RendererRun
1 parent a2a8c28 commit df843d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shiny/render/_render.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,9 @@ def __init__(
248248
name=render_fn.__name__,
249249
)
250250

251-
# Given we use `_utils.run_coro_sync(self._run())` to call our method,
252-
# we can act as if `render_fn` and `handler_fn` are always async
251+
# `render_fn` is not required to be async. For consistency, we wrapped in an
252+
# async function so that when it's passed in to `handler_fn`, `render_fn` is
253+
# **always** an async function.
253254
self._render_fn = _utils.wrap_async(render_fn)
254255
self._handler_fn = handler_fn
255256
self._params = params

0 commit comments

Comments
 (0)