Re: [tuxdroid-user] usleep in send_daemon_disconnect()
Status: Beta
Brought to you by:
ks156
From: neimad <ror...@gm...> - 2007-06-02 08:03:11
|
"David Bourgeois" <da...@ja...> writes: > There are 3 usleep in the code right now: > 1. in id_lookup(), the RF is not connected and an id_lookup request is > sent, usleep is used to wait for the answer that should be in the > dongle 100ms to a few seconds later, there's nothing else to do while > waiting here so usleep maybe still makes sense, no? That's ok, i guess. > 2. in send_daemon_disconnected() but I don't understand what it's for, > I'll ask r=C3=A9mi on Monday but I guess we can just remove it; Ok, I'll repress my urges until then. > 3. in usb_write_TuxDroid(), we first send the request to get the > status, then the USB IC stores all data in the buffer and then it's > available on the USB bus, usleep is meant to wait for the data here. > That's the part I'd like to change by cutting the function in 2 parts > as we can process some TCP stuff while waiting for the USB. Agreed, we definitely need to make this asynchronous. Damien |