Huang Le
caf6150e97
Use async name resolving to improve net thread responsiveness
...
In the LookupIntern(), things changed are:
1. Call getaddrinfo_a() instead of getaddrinfo() if available, the former is a sync version of the latter;
2. Try using inet_pton()/inet_addr() to convert the input text to a network addr structure at first, if success the extra name resolving thread inside getaddrinfo_a() could be avoided;
3. An interruption point added in the waiting loop for return from getaddrinfo_a(), which completes the improve for thread responsiveness.
A easy way to see the effect is to kick off a 'bitcoind stop' immediately after 'bitcoind -daemon', before the change it would take several, or even tens of, minutes on a bad network situation to wait for the running bitcoind to exit, now it costs only seconds.
Signed-off-by: Huang Le <4tarhl@gmail.com >
2014-06-27 02:55:39 +08:00
..
2014-06-23 14:04:38 -04:00
2014-06-21 19:47:43 +02:00
2014-06-21 19:47:43 +02:00
2014-05-13 11:41:59 +02:00
2014-05-09 18:23:34 +02:00
2014-06-05 16:05:57 -04:00
2012-04-27 10:14:33 -04:00
2012-01-23 14:27:08 -05:00
2014-06-25 10:31:35 +02:00
2014-06-25 14:57:21 -04:00
2014-01-23 16:05:01 +01:00
2014-06-25 09:24:50 +02:00
2014-06-25 09:24:50 +02:00
2013-11-10 09:36:28 -06:00
2013-10-20 14:29:24 +07:00
2013-11-10 09:36:28 -06:00
2014-06-11 23:20:37 -04:00
2014-05-10 00:42:31 +02:00
2014-01-14 11:19:52 +01:00
2014-06-25 10:31:35 +02:00
2014-01-14 11:19:52 +01:00
2014-06-15 15:38:22 +02:00
2014-06-22 00:06:17 +02:00
2014-06-22 00:06:17 +02:00
2014-06-25 10:31:35 +02:00
2014-06-25 10:31:35 +02:00
2014-06-25 10:31:35 +02:00
2014-06-25 10:31:35 +02:00
2014-06-25 10:31:35 +02:00
2014-04-02 03:48:07 +02:00
2013-11-10 09:36:28 -06:00
2014-06-23 14:04:38 -04:00
2013-11-18 08:16:12 +01:00
2013-11-30 15:42:10 +10:00
2013-11-30 15:42:10 +10:00
2014-05-02 20:45:03 +02:00
2014-06-21 22:59:03 +02:00
2014-06-22 00:06:17 +02:00
2013-12-04 12:46:13 +01:00
2013-12-04 12:46:13 +01:00
2014-04-01 09:41:49 +02:00
2013-12-04 12:46:13 +01:00
2014-06-21 19:47:39 +02:00
2014-06-21 19:47:43 +02:00
2014-06-26 14:31:06 +00:00
2014-06-12 16:11:56 +02:00
2014-06-21 19:47:42 +02:00
2014-06-03 12:09:51 -07:00
2014-05-08 00:55:01 -04:00
2014-03-24 20:26:02 +00:00
2014-03-31 09:51:58 +02:00
2014-05-22 00:23:03 +07:00
2013-11-10 09:36:28 -06:00
2014-06-26 11:49:46 +00:00
2014-06-23 23:10:24 +02:00
2014-06-25 10:31:35 +02:00
2014-06-25 10:31:35 +02:00
2014-06-25 10:31:35 +02:00
2014-06-25 10:31:35 +02:00
2014-06-26 11:49:46 +00:00
2014-06-21 19:47:39 +02:00
2014-05-30 12:01:53 +02:00
2014-06-23 14:04:38 -04:00
2014-06-23 10:21:38 +02:00
2014-06-27 02:55:39 +08:00
2014-06-23 14:04:38 -04:00
2014-02-09 21:06:06 -05:00
2013-11-10 09:36:28 -06:00
2014-06-23 23:10:24 +02:00
2014-06-23 23:10:24 +02:00
2014-06-04 13:29:36 +02:00
2014-06-21 11:43:23 -04:00
2014-06-17 13:11:36 +02:00
2014-06-26 11:49:46 +00:00
2014-06-15 15:38:22 +02:00
2014-04-23 01:50:25 +02:00
2014-06-26 11:49:46 +00:00
2014-06-25 10:31:35 +02:00
2014-06-25 09:24:50 +02:00
2014-05-23 15:23:11 +02:00
2014-05-13 07:23:23 +02:00
2014-06-22 00:06:17 +02:00
2014-06-26 11:49:46 +00:00
2014-06-26 11:49:46 +00:00
2014-06-25 09:24:50 +02:00
2014-06-26 14:31:06 +00:00
2014-06-25 14:57:21 -04:00
2014-06-23 10:38:15 +02:00
2014-02-18 12:11:46 -05:00
2013-12-19 09:46:11 +01:00
2013-11-10 09:36:28 -06:00
2014-06-25 09:24:50 +02:00
2014-06-25 09:24:50 +02:00
2014-02-28 09:25:00 +01:00
2014-06-23 23:10:24 +02:00
2014-05-09 16:44:59 +02:00
2014-06-26 11:49:46 +00:00
2014-06-26 11:49:46 +00:00
2014-06-03 15:21:47 +02:00
2014-05-09 16:45:00 +02:00
2014-06-26 17:11:53 +02:00
2014-06-25 09:24:50 +02:00
2014-06-12 13:52:15 +02:00
2013-11-11 10:31:09 +10:00
2014-06-25 09:24:50 +02:00
2014-06-24 17:04:52 +02:00
2014-06-16 18:56:57 +02:00
2014-06-16 18:56:57 +02:00