LibUsbDotNet 2.2.8
LockEvents Method (sessionHandle)
Library ReferenceMonoLibUsbMonoUsbApiLockEvents(MonoUsbSessionHandle)
LibUsbDotNet on SourceForge
Acquire the event handling lock, blocking until successful acquisition if it is contended.
Declaration Syntax
C#Visual BasicVisual C++
public static void LockEvents(
	MonoUsbSessionHandle sessionHandle
Public Shared Sub LockEvents ( _
	sessionHandle As MonoUsbSessionHandle _
static void LockEvents(
	[InAttribute] MonoUsbSessionHandle^ sessionHandle

This lock is used to ensure that only one thread is monitoring libusb event sources at any one time.

You only need to use this lock if you are developing an application which calls poll() or select() on libusb's file descriptors directly. If you stick to libusb's event handling loop functions (e.g. libusb_handle_events) then you do not need to be concerned with this locking.

While holding this lock, you are trusted to actually be handling events. If you are no longer handling events, you must call libusb_unlock_events as soon as possible.

Note: Member documentation was originally generated using the Libusb-1.0 API documentation: Polling and timing

Assembly: LibUsbDotNet (Module: LibUsbDotNet) Version: (