:: Re: [DNG] Doing away with multi-thr…
Góra strony
Delete this message
Reply to this message
Autor: Edward Bartolo
Data:  
Dla: Rainer Weikusat
CC: dng
Temat: Re: [DNG] Doing away with multi-threading in my project (netman)
Quote: "This means the GUI/ frontend
either needs to handle SIGCHLD in order to get notified when a child
process terminates so that a suitable wait call (which doubtlessly exists in the
Free Pascal libraries) can be used to get rid of the zombie without
having to wait for it or (the by far most simple solution), it (the GUI)
needs to set the disposition of SIGCHLD to SIG_IGN because then, zombies
won't even be created."

Aha, that gave me an idea, thanks for that. I can use the signal of
the arrival of a new zombie as the time at which to re-enable grayed
out buttons.

The benefit of all this: very little changes to code and no
multi-threading complications.

Thanks. :D

On 02/09/2015, Rainer Weikusat <rainerweikusat@???> wrote:
> Edward Bartolo <edbarx@???> writes:
>
> [...]
>
>> The idea is this: the backend would be converted into some sort of a
>> daemon exporting one function and importing another one. The frontend
>> would use the exported function from the backend to send it commands.
>> The backend would do the same thing with the exported function from
>> the frontend:
>>
>> Visually, this is as follows:
>>
>> Frontend -------------->> Backend
>> Frontend <<-------------- Backend
>
> This is not possible because functions can't be 'exported' in this way
> (OTOH, the whole backend - frontend split is pretty pointless, anyway
> ...)
>
>> In my humble opinion, this may help getting rid of having to use
>> multithreading to avoid temporary frontend deadlocks.
>
> As I already explained to you quite some times: There is no such
> need. You just have to stop fighting the API for dealing with deceased
> subprocesses and start using it instead. This means the GUI/ frontend
> either needs to handle SIGCHLD in order to get notified when a child
> process terminates so that a suitable wait call (which doubtlessly exists in
> the
> Free Pascal libraries) can be used to get rid of the zombie without
> having to wait for it or (the by far most simple solution), it (the GUI)
> needs to set the disposition of SIGCHLD to SIG_IGN because then, zombies
> won't even be created.
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>