面向事件编程的时候, 经常遇到 poll 这个单词, 该怎么理解?
資深大佬 : DinoStray 4
查了字典, 这个词是 投票 的意思, 还是悟不透
大佬有話說 (9)
查了字典, 这个词是 投票 的意思, 还是悟不透
1. Polling, or polled operation, in computer science, refers to actively sampling the status of an external device by a client program as a synchronous activity. Polling is most often used in terms of input/output (I/O), and is also referred to as polled I/O or software-driven I/O.
2. Polling is the process where the computer or controlling device waits for an external device to check for its readiness or state, often with low-level hardware.
简单地说,poll 是(主动地)检查外部设备的(就绪)状态。这里的外部设备不一定指硬件,只要有(多种)状态,都可以拿来 poll 。