LibUsbDotNet 2.2.8
EventHandlingOk Method (sessionHandle)
Library ReferenceMonoLibUsbMonoUsbApiEventHandlingOk(MonoUsbSessionHandle)
LibUsbDotNet on SourceForge
Determine if it is still OK for this thread to be doing event handling.
Declaration Syntax
C#Visual BasicVisual C++
public static int EventHandlingOk(
	MonoUsbSessionHandle sessionHandle
Public Shared Function EventHandlingOk ( _
	sessionHandle As MonoUsbSessionHandle _
) As Integer
static int EventHandlingOk(
	[InAttribute] MonoUsbSessionHandle^ sessionHandle
Return Value
  • 1 if event handling can start or continue.
  • 0 if this thread must give up the events lock.

Sometimes, libusb needs to temporarily pause all event handlers, and this is the function you should use before polling file descriptors to see if this is the case.

If this function instructs your thread to give up the events lock, you should just continue the usual logic that is documented in Multi-threaded applications and asynchronous I/O. On the next iteration, your thread will fail to obtain the events lock, and will hence become an event waiter.

This function should be called while the events lock is held: you don't need to worry about the results of this function if your thread is not the current event handler.

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

Assembly: LibUsbDotNet (Module: LibUsbDotNet) Version: (