zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <psprint2@fastmail.com>
To: zsh-workers@zsh.org
Cc: Bart Schaefer <schaefer@brasslantern.com>
Subject: Re: Multithreading support in pluggable module, but with problems
Date: Sat, 11 Feb 2017 12:56:26 -0800	[thread overview]
Message-ID: <1486846586.2833105.877977080.55BDB4C9@webmail.messagingengine.com> (raw)
In-Reply-To: <170211123934.ZM903@torch.brasslantern.com>

On Sat, Feb 11, 2017, at 12:39 PM, Bart Schaefer wrote:
> On Feb 11, 12:14pm, Sebastian Gniazdowski wrote:
> }
> } I think I got code close to working state. Can consecutively spawn 32
> } threads one hundred times. Have functions without queue_signals() etc.
> } copied from Zsh. What is to stop conflicts are helper variables.
> 
> So, what you mean is that what stops conflicts is well-written shell
> scripts that remember to check the semaphores.

Yes for shell script that are semaphores – this might be difficult, e.g.
I've found obvious race condition hour ago that was popping up whole
day, but scripts can require carefulness to give e.g. performance. In
shell-use it might be simple "echo $workers_count", to see 0 there, as a
signal to go on with reading output of:

zpin "ls -R /home/user | zpopulator -a my_files"
 
> There's no reason to reserve descriptors just add them as you open them,
> and close them with zclose().  Also, you shouldn't add any that aren't
> actually open.
> 
> Please, take a look at the way tcp.c or even socket.c manages file
> descriptors, it'll probably save you a lot of thrashing.

Thanks.

-- 
  Sebastian Gniazdowski
  psprint2@fastmail.com


      reply	other threads:[~2017-02-11 20:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11 12:58 Sebastian Gniazdowski
2017-02-11 16:43 ` Sebastian Gniazdowski
2017-02-11 19:46 ` Bart Schaefer
2017-02-11 20:14   ` Sebastian Gniazdowski
2017-02-11 20:39     ` Bart Schaefer
2017-02-11 20:56       ` Sebastian Gniazdowski [this message]

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=1486846586.2833105.877977080.55BDB4C9@webmail.messagingengine.com \
    --to=psprint2@fastmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).