handle和handler的理解
生活随笔
收集整理的這篇文章主要介紹了
handle和handler的理解
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
維基百科對handler的解釋:
Handler, an asynchronous callback (computer programming) subroutine in computing ... Event handler, a routine for processing a programming event Interrupt handler, a routine for processing CPU interrupts Signal handler, a routine for handling signals sent to a process Exception handler, a routine for handling software exceptions維基百科對handle的解釋:
In computer programming, a handle is an abstract reference to a resource. Handles are used when application software references blocks of memory or objects managed by another system, such as a database or an operating system. A resource handle can be an opaque identifier, in which case it is often an integer number (often an array index in an array or "table" that is used to manage that type of resource), or it can be a pointer that allows access to further information.Common resource handles are file descriptors, network sockets, database connections, process identifiers (PIDs), and job IDs. Process IDs and job IDs are explicitly visible integers, while file descriptors and sockets (which are often implemented as a form of file descriptor) are represented as integers, but are typically considered opaque. In traditional implementations, file descriptors are indices into a (per-process) file descriptor table, thence a (system-wide) file table.總結來說
A handle is an abstract reference to a resource. Handle是對某個資源的抽象引用。 A handler is an asynchronous callback subroutine. Handler則是一個異步的回調函數(子程序)。總結
以上是生活随笔為你收集整理的handle和handler的理解的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 石头科技也造车?或将在下半年推出
- 下一篇: 年终奖缩水劝退电商人:互联网行业没那么香