Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Multithreading support in pluggable module, but with problems
- X-seq: zsh-workers 40531
- From: Sebastian Gniazdowski <psprint2@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Multithreading support in pluggable module, but with problems
- Date: Sat, 11 Feb 2017 12:56:26 -0800
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=7JpbNFGgelRwjFSxAB+XvNLEs1 o=; b=rn4DksL64pvLTsqvek8Cqzp8Cnok2REvyrmCH1ia/aF6BkfIjUCecm1+ON xsIBSoEcCndsEAgC0qSn5LBOpFQsLB3wn2WhFzLr5SGEQRfXQ+6YB8Xfwa9CCAtN U+a9I/a8/cKXuJAmglMsI4VgxrRw8tn0vPPOxu8FcmxC+XFBc=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=smtpout; bh=7J pbNFGgelRwjFSxAB+XvNLEs1o=; b=pSDcoUpdkE8wfxkcAnl9e7Hgp0T33YFLu0 OuPKCb45FWgu2PJyFW6++cxCvSewX/5WX+DhUdqV3hOuYZQY5Ysfb7RxEGklmwNk qnwRcGfEMsw5qbhuv1yWnK+sZJKmrjhTaBuosawR3+uS4U4RG2NI1QIxkHr07Nrb DWnKvADJM=
- In-reply-to: <170211123934.ZM903@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1486817916.2745591.877718432.2CE18595@webmail.messagingengine.com> <170211114632.ZM665@torch.brasslantern.com> <1486844071.2825373.877945608.5B8686FF@webmail.messagingengine.com> <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@xxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author