Talk:Event loop
This is the talk page for discussing improvements to the Event loop article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
Untitled
editIsn't all this polling causing a lot of wasted CPU usage? — Abdull 14:15, 15 April 2007 (UTC)
- No, the central select (or poll) call is blocking. –EdC 16:06, 15 April 2007 (UTC)
- And blocking (computing) doesn't cause wasted CPU usage? — Abdull 15:49, 19 April 2007 (UTC)
- Certainly not; the kernel will suspend the task until the status of the file descriptor(s) changes or an event occurs. –EdC 21:40, 19 April 2007 (UTC)
- Thank you very much for your answers! — Abdull 20:59, 22 April 2007 (UTC)
- Certainly not; the kernel will suspend the task until the status of the file descriptor(s) changes or an event occurs. –EdC 21:40, 19 April 2007 (UTC)
- And blocking (computing) doesn't cause wasted CPU usage? — Abdull 15:49, 19 April 2007 (UTC)
Preemptive vs cooperative
editIn the usage section, I edited a misleading distinction made between cooperative and preemptive models. It was wrongly stated that under the cooperative model getnextmessage() would not block. This is not generally true, the usual case is that it would block. The difference is that under the cooperative model, if the process fails to promptly call the getnextmessage() or yield() it can freeze the whole system. This does not however imply that preemptive systems are more efficient. — Choppingmall (talk) 04:28, 3 February 2008 (UTC)
File interface code sample
editWhat language is the code/pseudocode under the 'File Interface' section written in? What does it do? It is hard to understand and insufficient context or explanation is provided for it to be understood by someone unfamiliar with the topic. — TropicalFishes (talk) 19:27, 18 March 2016 (UTC)
- And the syntax seems awkward, e.g. why the space before the parentheses? — Preceding unsigned comment added by 79.240.253.135 (talk) 22:11, 12 November 2017 (UTC)
- The syntaxhighlight template specified the lang attribute as Python but it wasn't really Python, I tidied it up to be more Python. — Frap (talk) 13:07, 4 January 2021 (UTC)
Alternative design examples are misleading
editThere's no reason why a fire-and-forget program cannot have a central main loop. Having no user interacting with a program doesn't mean that a the design is not useful (and it really is still a useful design for anything that deals with complex interacting systems). The same criticism applies to the "menu-driven" design. — Preceding unsigned comment added by 188.176.25.249 (talk) 07:28, 30 March 2020 (UTC)