zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Sebastian Gniazdowski <psprint@zdharma.org>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Loading Eprog in other thread doesn't work
Date: Mon, 19 Jun 2017 13:12:53 -0700	[thread overview]
Message-ID: <CAH+w=7YBKMffROA=so+WSP97U=Zn-oSAWM6mA3o1_C_hBCiqow@mail.gmail.com> (raw)
In-Reply-To: <etPan.5947e1be.54594545.63ea@zdharma.org>

On Mon, Jun 19, 2017 at 7:37 AM, Sebastian Gniazdowski
<psprint@zdharma.org> wrote:
>
> But it looks like state of Zsh gets disrupted. Single run of source_prepare / source_load often works, the code is executed fine. However the longer I repeat this, the weirder things happen. Example backtraces at the end.
>

Neither signal handling (which includes reaping child processes when
they exit) nor memory management is thread-safe, and there may be
shared memory issues with threads and traditional process forking as
well.  The more threads you try to have the more likely you're going
to be to wander into one of these areas.  I'd be very skeptical that
you can just plop threading into one part of zsh without at least some
serious semaphore work on the rest of it.


  reply	other threads:[~2017-06-19 20:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 14:37 Sebastian Gniazdowski
2017-06-19 20:12 ` Bart Schaefer [this message]
2017-06-20  4:37   ` Sebastian Gniazdowski
2017-06-20  6:02     ` Bart Schaefer
     [not found] ` <etPan.59483072.5b1b299a.63ea@AirmailxGenerated.am>
2017-06-20  2:42   ` Sebastian Gniazdowski
2017-06-20  5:59     ` Bart Schaefer

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='CAH+w=7YBKMffROA=so+WSP97U=Zn-oSAWM6mA3o1_C_hBCiqow@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=psprint@zdharma.org \
    --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).