Skip to content
Discussion options

You must be logged in to vote

It indirectly does, since this call event_id = listener.blocking_wait_one() puts the receiver side instantly to sleep if there is no data available. And the longer it sleeps, the deeper the sleep gets - from a scheduler point of view.

At first, the process is constantly rescheduled to check if there is new data, but this only goes for several hundred nanoseconds, maybe a few microseconds. Then the process is removed from the internal queue and put into deep sleep. When something later happens, the process is reloaded, put into the scheduler queue again, and can continue to work - and this is the time-intensive part.

Replies: 1 comment 3 replies

Comment options

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

@elfenpiff
Comment options

Answer selected by kiasar
@kiasar
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