php8.5
Home/ Manual/ event / eventbuffer/ EventBuffer::enableLocking

EventBuffer::enableLocking

PHP function Edit on GitHub ✎

(PECL event >= 1.2.6-beta)

Description

EventBuffer::enableLocking(): void

Enable locking on an EventBuffer so that it can safely be used by multiple threads at the same time. When locking is enabled, the lock will be held when callbacks are invoked. This could result in deadlock if you aren't careful. Plan accordingly!

Parameters Parameters

Return Values

Void

See Also

  • Evbuffers and Thread-safety

Source: reference/event/eventbuffer/enablelocking.xml · from the official PHP manual (php/doc-en)