From: cinap_lenrek@gmx.de
To: 9fans@9fans.net
Subject: Re: [9fans] libthread API
Date: Sat, 9 Jan 2010 06:50:05 +0100 [thread overview]
Message-ID: <9a85b2919100cf268e471b3b04c3c9cb@gmx.de> (raw)
In-Reply-To: <20100109053313.GA19304@machine>
> Thanks, now I understand. The main question was why threadcreate asks
> for function pointer and can't just leave me in my function like rfork.
> So it is because we should move local variables out of scope as they
> are no more valid cause we have a new completely clear stack.
yes.
> But when it is better to use rfork with shared memory and when
> libthread?
depends. but in the majority of cases you want to use libthread because
it also gives you synchronization primitives like channels and has
co-routines called threads wich run cooperatively in a real system
proc.
but nobody forces you to use libthread. you can just use system primitives
like rendezvous, qlocks, pipes and shared memory with rfork.
--
cinap
next prev parent reply other threads:[~2010-01-09 5:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-08 9:40 anonymous
2010-01-09 4:29 ` Gorka Guardiola
2010-01-09 4:33 ` erik quanstrom
2010-01-09 4:52 ` cinap_lenrek
2010-01-09 5:33 ` anonymous
2010-01-09 5:50 ` cinap_lenrek [this message]
2010-01-09 5:55 ` Bruce Ellis
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=9a85b2919100cf268e471b3b04c3c9cb@gmx.de \
--to=cinap_lenrek@gmx.de \
--cc=9fans@9fans.net \
/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).