Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Multithreading support in pluggable module, but with problems

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.


  Sebastian Gniazdowski

Messages sorted by: Reverse Date, Date, Thread, Author