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

已關閉
yannweb5 年之前建立 · 2 條評論

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 新增至BETA version 里程碑 5 年之前
yannweb added the
enhancement
label 5 年之前
yannweb added the
question
label 5 年之前
yannweb added the
_core
label 5 年之前
yannweb 評論 5 年之前
所有者

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 started working 5 年之前
yannweb cancelled time tracking 5 年之前
yannweb5 年之前 指派給自己
yannweb started working 5 年之前
yannweb stopped working 5 年之前
1h 17min 44s
yannweb added a new dependency 5 年之前
yannweb added a new dependency 5 年之前
yannweb added spent time 5 年之前
1h
yannweb 評論 5 年之前
所有者

closed by b3af92459e

closed by b3af92459e
yannweb5 年之前 關閉
登入 才能加入這對話。
Loading…
取消
儲存
尚未有任何內容