Skip to content

Is it possible to emit a message from a function? #2034

Answered by miguelgrinberg
bp32795 asked this question in Q&A
Discussion options

You must be logged in to vote

You are running the for loop before returning the template to the browser, which in turn will allow the browser to make a connection. You may want to loop at the example I referenced earlier, which uses a background thread for the function.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bp32795
Comment options

@miguelgrinberg
Comment options

Answer selected by bp32795
@bp32795
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants