I specifically refer to InputStream (Java SE) and its implementation.
How is blocking performed? I'm a little worried that they use a wait mechanism, as this can lead to a lot of overhead. I think they do it differently, but I just want to be sure.
No, they do not use expectation. It depends on the implementation (which will depend on the type of input stream used), but, as a rule, it can use an OS-level blocking API, so the efficiency will depend on the OS.
Source: https://habr.com/ru/post/1306105/More articles:C ++ template type inference problem - c ++Autocomplete Eclipse for Roo project - javaShould OpenID be distinguished based on a protocol prefix or not? http vs https - httpHow can I get a call handler for a Java proxy? - javavisual studio 2008 equivalent for javascript - javascriptmobile browsers cannot enter my site - authenticationampersand in email (href) - htmlundefined: PyUnicodeUCS2_Decode when trying to install psycopg2 - pythonBoost.MultiIndex: is there a way to share an object between two processes? - c ++Creating a simple VS2008 visualizer inside autoexp.dat (casting problem) - c ++All Articles