02-23-2013, 02:45 PM
Hi Gintaras, hi all
I've got a function that triggers on USB disk insertion.
Action depends on disk, but if i plug 2 USB devices in a short time, the second one is skipped as my function
is in use.
So, how to:
1) Have function trigerred by USB (this one works, thanks for prior help in forum)
2) The trigger function (OnUSB) do an action in a separate function DoAction, making itself available for another USB, even if DoAction is not ended
3) upon insertion of second device, either OnUSB queues the event, either it can fire DoAction function in a separated thread independent..
Other words : OnUSB can fire async DoAction function on trigger, or queue them
Thanks
I've got a function that triggers on USB disk insertion.
Action depends on disk, but if i plug 2 USB devices in a short time, the second one is skipped as my function
is in use.
So, how to:
1) Have function trigerred by USB (this one works, thanks for prior help in forum)
2) The trigger function (OnUSB) do an action in a separate function DoAction, making itself available for another USB, even if DoAction is not ended
3) upon insertion of second device, either OnUSB queues the event, either it can fire DoAction function in a separated thread independent..
Other words : OnUSB can fire async DoAction function on trigger, or queue them
Thanks
