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

クローズ
yannweb4年前 に作成 · 2件のコメント
yannweb4年前 にコメント

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 に追加 4年前
yannweb がラベル
enhancement
を追加 4年前
yannweb がラベル
question
を追加 4年前
yannweb がラベル
_core
を追加 4年前
yannweb4年前 にコメント
オーナー

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 が作業を開始 4年前
yannweb がタイムトラッキングを中止 4年前
yannweb が自身を担当者に設定 4年前
yannweb が作業を開始 4年前
yannweb が作業を終了 4年前
1h 17min 44s
yannweb が依存関係を追加 4年前
yannweb が依存関係を追加 4年前
yannweb が作業時間を追加 4年前
1h
yannweb4年前 にコメント
オーナー

closed by b3af92459e

closed by b3af92459e
yannweb がクローズ 4年前
サインインしてこの会話に参加。
マイルストーンなし
担当者なし
1 人の参加者
かかった時間の合計: 2h 17min 44s
Yann Weber
2h 17min 44s
期日

期日は未設定です。

読み込み中…
キャンセル
保存
まだ内容がありません