9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] Threadcreate() failure value?
Date: Wed, 30 Nov 2005 14:16:24 -0500	[thread overview]
Message-ID: <ee9e417a0511301116vf07aca2v833a0a9ab84d346c@mail.gmail.com> (raw)
In-Reply-To: <Pine.GSO.4.61.0511301359180.3380@cps210.cps.cmich.edu.>

> On Wed, 30 Nov 2005, Russ Cox wrote:
> > thread(2):
> >
> >        Thread library functions do not return on failure;
> >        if errors occur, the entire program is aborted.
>
> Interesting. If threads are being created by a main thread on the
> fly to handle some task, it means all threads (including main thread)
> disappear??

The only way these can fail is if you run out of memory
or you run out of processes.

> What if there is a need for active threads to complete
> the assigned tasks?

Then you should fix the memory or process leaks.

Russ


  reply	other threads:[~2005-11-30 19:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-30 16:03 ISHWAR RATTAN
2005-11-30 18:31 ` Russ Cox
2005-11-30 19:02   ` ISHWAR RATTAN
2005-11-30 19:16     ` Russ Cox [this message]
2005-11-30 19:59       ` Ronald G Minnich
2005-11-30 20:39         ` Russ Cox
2005-11-30 20:43           ` Ronald G Minnich
2005-11-30 20:50             ` Russ Cox
2005-11-30 20:58           ` Martin Harriss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee9e417a0511301116vf07aca2v833a0a9ab84d346c@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).