mirror of
https://github.com/curl/curl.git
synced 2026-08-24 14:23:30 +03:00
badwords: catch and fix threading-related words
Also: - sync newlines between the two threaded examples. Closes #20001
This commit is contained in:
parent
8dadff9434
commit
61273f5812
25 changed files with 45 additions and 38 deletions
2
docs/examples/.gitignore
vendored
2
docs/examples/.gitignore
vendored
|
|
@ -79,7 +79,6 @@ multi-legacy
|
|||
multi-post
|
||||
multi-single
|
||||
multi-uv
|
||||
multithread
|
||||
netrc
|
||||
parseurl
|
||||
persistent
|
||||
|
|
@ -123,6 +122,7 @@ smtp-tls
|
|||
smtp-vrfy
|
||||
sslbackend
|
||||
synctime
|
||||
threaded
|
||||
threaded-ssl
|
||||
unixsocket
|
||||
url2file
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ check_PROGRAMS = \
|
|||
COMPLICATED_MAY_BUILD = \
|
||||
cacertinmem.c \
|
||||
multi-uv.c \
|
||||
multithread.c \
|
||||
sessioninfo.c \
|
||||
threaded.c \
|
||||
threaded-ssl.c \
|
||||
usercertinmem.c
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ static int my_trace(CURL *curl, curl_infotype type,
|
|||
known_offset = 1;
|
||||
}
|
||||
secs = epoch_offset + tv.tv_sec;
|
||||
now = localtime(&secs); /* not thread safe but we do not care */
|
||||
now = localtime(&secs); /* not thread-safe but we do not care */
|
||||
snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld",
|
||||
now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* A multi threaded application that uses a progress bar to show
|
||||
* status. It uses Gtk+ to make a smooth pulse.
|
||||
* A multi-threaded application that uses a progress bar to show
|
||||
* status. It uses Gtk+ to make a smooth pulse.
|
||||
* </DESC>
|
||||
*/
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
/* A multi-threaded example that uses pthreads and fetches 4 remote files at
|
||||
* once over HTTPS.
|
||||
*
|
||||
* Recent versions of OpenSSL and GnuTLS are thread safe by design, assuming
|
||||
* Recent versions of OpenSSL and GnuTLS are thread-safe by design, assuming
|
||||
* support for the underlying OS threading API is built-in. Older revisions
|
||||
* of this example demonstrated locking callbacks for the SSL library, which
|
||||
* are no longer necessary. An older revision with callbacks can be found at
|
||||
|
|
@ -40,7 +40,9 @@
|
|||
/* Also requires TLS support to run */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#define NUMT 4
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ int main(void)
|
|||
pthread_join(tid[i], NULL);
|
||||
fprintf(stderr, "Thread %d terminated\n", i);
|
||||
}
|
||||
|
||||
curl_global_cleanup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue