On Mon, Jun 8, 2020 at 10:35 PM Daniel Stenberg <dan...@haxx.se> wrote:
> On Mon, 8 Jun 2020, James Read via curl-library wrote: > > > This is because my web crawler uses this function and the read() call > seems > > to be causing problems with my web crawler. > > > > What is the read() call for? > > Obviously it reads from the file descriptor created by timerfd_create(). > Which > is a Linux timer API. > > > It has been suggested to me elsewhere that I could use select instead. Is > > that right? > > Instead of epoll you mean? If you intend to use the multi_socket API then > using select is not advisable, as it really is not suitable for > event-based > systems. > > It was suggested to me to use select instead of read. I know. That left me scratching my head as well. As far as I can see the read call is made so that the special case of receiving an errno = EAGAIN can be returned without calling curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0, &g->still_running) How select is an alternative to this is beyond my very limited knowledge. It also escapes me why calling read would interfere with mysql_store_result_nonblocking(mysql_conn, &result) which is what seems to be happening in my program. James Read > > What would the behaviour of the program be if the read call was simply > > taken out? > > I can't answer that, I really don't know that interface. > > -- > > / daniel.haxx.se | Commercial curl support up to 24x7 is available! > | Private help, bug fixes, support, ports, new features > | https://www.wolfssl.com/contact/ >
------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html