Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #1083
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.straub-nv.de!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!news.internetia.pl!not-for-mail |
|---|---|
| From | bartek szurgot <basz@no.spam> |
| Newsgroups | comp.programming.threads |
| Subject | Re: String multithreading issue |
| Date | Thu, 20 Sep 2012 17:53:05 +0200 |
| Organization | Netia S.A. |
| Lines | 20 |
| Message-ID | <k3fedn$6kd$1@mx1.internetia.pl> (permalink) |
| References | <0992cd7c-02bf-47e6-8c88-a171b7de8408@googlegroups.com> |
| NNTP-Posting-Host | 90-156-41-229.internetia.net.pl |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | mx1.internetia.pl 1348156663 6797 90.156.41.229 (20 Sep 2012 15:57:43 GMT) |
| X-Complaints-To | abuse@inetia.pl |
| NNTP-Posting-Date | Thu, 20 Sep 2012 15:57:43 +0000 (UTC) |
| In-Reply-To | <0992cd7c-02bf-47e6-8c88-a171b7de8408@googlegroups.com> |
| X-Tech-Contact | usenet@internetia.pl |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6 |
| X-Server-Info | http://www.internetia.pl/ |
| Xref | csiph.com comp.programming.threads:1083 |
Show key headers only | View raw
On 09/20/2012 09:50 AM, itt ium wrote:
> int main()
> {
> pthread_t tid[2];
> pthread_create(&tid[0], NULL, do_work, NULL);
> pthread_create(&tid[1], NULL, do_work, NULL);
>
> return 0;
> }
you do not join your threads, so you have a race - if threads will not
end before program exits, you have a problem. my guess is that when run
from shell, threads are not even started, but hellgrind uses different
scheduling algorithm, so you get an error.
--
pozdrawiam serdecznie / best regards,
bartek szurgot
/* http://www.baszerr.eu */
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar
String multithreading issue itt ium <ittium@gmail.com> - 2012-09-20 00:50 -0700
Re: String multithreading issue Marcel Müller <news.5.maazl@spamgourmet.com> - 2012-09-20 11:54 +0200
Re: String multithreading issue bartek szurgot <basz@no.spam> - 2012-09-20 17:53 +0200
Re: String multithreading issue Marcel Müller <news.5.maazl@spamgourmet.com> - 2012-09-21 08:09 +0200
Re: String multithreading issue Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2012-09-21 13:42 +0100
Re: String multithreading issue Marc <marc.glisse@gmail.com> - 2012-09-20 16:37 +0000
csiph-web