about how to use start_background_task? #2023
Answered
by
miguelgrinberg
ufoozhenghao
asked this question in
Q&A
-
Functional Requirement: When the client successfully connects, Python should send a random number to the HTML at a frequency of once per second.
my js code:
|
Beta Was this translation helpful? Give feedback.
Answered by
miguelgrinberg
Nov 17, 2023
Replies: 1 comment 4 replies
-
What does this mean exactly? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Two options:
socket.sleep(0)
, there is no requirement to pause for 5 seconds. A sleep with at least 0 is required when using greenlets (eventlet or gevent) to maintain concurrency.threading
async_mode, which implements concurrency with standard threads.