Documentation: Add a note regarding the execution context of callbacks Make it more clear that callbacks are only called when libusb_handle_events() is called and that all callbacks will be called on the same thread calling that function. Closes #349 Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
diff --git a/libusb/io.c b/libusb/io.c index 3b1a513..b95c382 100644 --- a/libusb/io.c +++ b/libusb/io.c
@@ -544,7 +544,14 @@ * application must call into when libusb has work do to. This gives libusb * the opportunity to reap pending transfers, invoke callbacks, etc. * - * There are 2 different approaches to dealing with libusb_handle_events: + * \note + * All event handling is performed by whichever thread calls the + * libusb_handle_events() function. libusb does not invoke any callbacks + * outside of this context. Consequently, any callbacks will be run on the + * thread that calls the libusb_handle_events() function. + * + * When to call the libusb_handle_events() function depends on which model + * your application decides to use. The 2 different approaches: * * -# Repeatedly call libusb_handle_events() in blocking mode from a dedicated * thread.
diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 7636904..0782b51 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h
@@ -1 +1 @@ -#define LIBUSB_NANO 11542 +#define LIBUSB_NANO 11543