Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #1083
| From | bartek szurgot <basz@no.spam> |
|---|---|
| Newsgroups | comp.programming.threads |
| Subject | Re: String multithreading issue |
| Date | 2012-09-20 17:53 +0200 |
| Organization | Netia S.A. |
| Message-ID | <k3fedn$6kd$1@mx1.internetia.pl> (permalink) |
| References | <0992cd7c-02bf-47e6-8c88-a171b7de8408@googlegroups.com> |
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