在PHP中有这么一族函数,他们是对UNIX的V IPC函数族的包装。包括:信号量(Semaphores)、共享内存(Shared Memory)、进程间通信(Inter-Process Messaging, IPC)。基于这些,我们完全有可能将PHP包装成一基于消息驱动的系统。
semaphore函数
- ftok()
- ConvertapathnameandaprojectidentifiertoaSystemVIPCkey
- msg_get_queue()
- Createorattachtoamessagequeue
- msg_queue_exists()
- Checkwhetheramessagequeueexists
- msg_receive()
- Receiveamessagefromamessagequeue
- msg_remove_queue()
- Destroyamessagequeue
- msg_send()
- Sendamessagetoamessagequeue
- msg_set_queue()
- Setinformationinthemessagequeuedatastructure
- msg_stat_queue()
- Returnsinformationfromthemessagequeuedatastructure
- sem_acquire()
- Acquireasemaphore
- sem_get()
- Getasemaphoreid
- sem_release()
- Releaseasemaphore
- sem_remove()
- Removeasemaphore
- shm_attach()
- Createsoropenasharedmemorysegment
- shm_detach()
- Disconnectsfromsharedmemorysegment
- shm_get_var()
- Returnsavariablefromsharedmemory
- shm_has_var()
- Checkwhetheraspecificentryexists
- shm_put_var()
- Insertsorupdatesavariableinsharedmemory
- shm_remove_var()
- Removesavariablefromsharedmemory
- shm_remove()
- RemovessharedmemoryfromUnixsystems