From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9630 invoked by alias); 20 Jun 2017 02:43:05 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41328 Received: (qmail 9425 invoked from network); 20 Jun 2017 02:43:05 -0000 X-Qmail-Scanner-Diagnostics: from aok120.rev.netart.pl by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(85.128.245.120):SA:0(0.0/5.0):. Processed in 2.196302 secs); 20 Jun 2017 02:43:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint@zdharma.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at zdharma.org does not designate permitted sender hosts) X-Virus-Scanned: by amavisd-new using ClamAV (18) Date: Tue, 20 Jun 2017 04:42:57 +0200 From: Sebastian Gniazdowski To: Bart Schaefer Cc: "=?utf-8?Q?zsh-workers=40zsh.org?=" Message-ID: In-Reply-To: References: Subject: Re: Loading Eprog in other thread doesn't work X-Mailer: Airmail (442) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 19.06.2017 at 22:12:53, Bart Schaefer (schaefer@brasslantern.com) wrote: > 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. But the only thing that I do concurrently is loading of Eprog. So, open(), read(), that's all. When I invoke execode(), it is the main thread. "source_prepare" does the open, read, while "source_load" takes Eprog that is ready to use. -- Sebastian Gniazdowski psprint /at/ zdharma.org