John Chen wrote:
>
> Here is the problem
> 1) in the following code.
> ...
> for some very simple multi-threading , it works, but in more
> complicate case, the code stuck in the loop and I am getting the
> following:
> ...
> somehow the callback is never called.
We can't diagnose this. There is just way too much of the code that we
don't have. Are you suggesting that events are somehow getting lost?
You'd need to do some tracing to match up requests-in with events-out to
make sure of that.
> 2) If I lock a shared critical_section in the beginning of the
> transfer function,(That means I am running single thread, I am
> serialize the call) it takes 4-5 calls for
> libusb_handle_events_timeout to call the callback and exit the loop.
> this is the case even when 0 byte is read.
Well, when 0 bytes are read, it should time out. Right?
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel