#24 Pool_handling process & collection child IPC ( #20 #22 )

Fermé
créé il y a 4 ans par yannweb · 2 commentaires
yannweb a commenté il y a 4 ans

Two solutions :

  1. if no other data than a worker counter a simple pipe with Pool_handling sending the counter when it changes

  2. if more data to be shared/inspected by collection child shared memory seems to be the solution

Two solutions : 1. if no other data than a worker counter a simple pipe with Pool_handling sending the counter when it changes 2. if more data to be shared/inspected by collection child shared memory seems to be the solution
yannweb a ajouté cela au jalon BETA version il y a 4 ans
yannweb a ajouté l'étiquette
enhancement
il y a 4 ans
yannweb a ajouté l'étiquette
question
il y a 4 ans
yannweb a ajouté l'étiquette
_core
il y a 4 ans
yannweb a commenté il y a 4 ans
Propriétaire

The shared memory solution is the more extensible one. But it implies synchronization mechanism. The pool handling proc can update shared memory at each loop, and the collection process can read them using a POSIX timer.

An elegant one should have been to make collection child to SIGSTOP the pool handler pro, to read the data and then, to SIGCONT the pool handler proc. But in this case the pool handler loop will have to deal with EINTR failures….

A simplest solution is to use a semaphore and locking the data when accessing them.

The shared memory solution is the more extensible one. But it implies synchronization mechanism. The pool handling proc can update shared memory at each loop, and the collection process can read them using a POSIX timer. An elegant one should have been to make collection child to SIGSTOP the pool handler pro, to read the data and then, to SIGCONT the pool handler proc. But in this case the pool handler loop will have to deal with EINTR failures.... A simplest solution is to use a semaphore and locking the data when accessing them.
yannweb a démarré il y a il y a 4 ans
yannweb a annulé le suivi de temps pour il y a 4 ans
yannweb s'est assigné cela il y a 4 ans
yannweb a démarré il y a il y a 4 ans
yannweb a fini de travaillé pour il y a 4 ans
1h 17min 44s
yannweb a ajouté une nouvelle dépendance il y a 4 ans`
yannweb a ajouté une nouvelle dépendance il y a 4 ans`
yannweb  temps passé ajouté il y a 4 ans
1h
yannweb a commenté il y a 4 ans
Propriétaire

closed by b3af92459e

closed by b3af92459e
Connectez-vous pour rejoindre cette conversation.
Aucun jalon
Pas d'assignataires
1 participants
Temps passé total : 2h 17min 44s
Yann Weber
2h 17min 44s
Échéance

Aucune échéance n'a été définie.

Loading…
Annuler
Enregistrer
Il n'existe pas encore de contenu.