From b8d1fd69787ad0dabacbce87ac115bb66a02aef8 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Wed, 2 Apr 2025 14:53:15 -0300 Subject: [PATCH] Add LICENSE headers and module docstring on new files --- tractor/ipc/_ringbuf/_pubsub.py | 19 +++++++++++++++++++ tractor/ipc/_ringbuf/_ringd.py | 25 +++++++++++++++++++++++++ tractor/linux/_fdshare.py | 15 +++++++++++++++ tractor/linux/eventfd.py | 2 +- 4 files changed, 60 insertions(+), 1 deletion(-) diff --git a/tractor/ipc/_ringbuf/_pubsub.py b/tractor/ipc/_ringbuf/_pubsub.py index a41a83dd..94ce7460 100644 --- a/tractor/ipc/_ringbuf/_pubsub.py +++ b/tractor/ipc/_ringbuf/_pubsub.py @@ -1,3 +1,22 @@ +# tractor: structured concurrent "actors". +# Copyright 2018-eternity Tyler Goodlet. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. + +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +''' +Ring buffer ipc publish-subscribe mechanism brokered by ringd +can dynamically add new outputs (publisher) or inputs (subscriber) +''' import time from abc import ( ABC, diff --git a/tractor/ipc/_ringbuf/_ringd.py b/tractor/ipc/_ringbuf/_ringd.py index fb255979..a35de84b 100644 --- a/tractor/ipc/_ringbuf/_ringd.py +++ b/tractor/ipc/_ringbuf/_ringd.py @@ -1,3 +1,28 @@ +# tractor: structured concurrent "actors". +# Copyright 2018-eternity Tyler Goodlet. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. + +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +''' +Actor to broker ringbuf resources, creates and allocates +the resources, then automatically does fd passing. + +call open_ringd in your root actor + +then on actors that need a ringbuf resource use + +open_ringbuf acm, will automatically contact ringd. +''' import os import tempfile from pathlib import Path diff --git a/tractor/linux/_fdshare.py b/tractor/linux/_fdshare.py index a1ddceec..82dd0e69 100644 --- a/tractor/linux/_fdshare.py +++ b/tractor/linux/_fdshare.py @@ -1,3 +1,18 @@ +# tractor: structured concurrent "actors". +# Copyright 2018-eternity Tyler Goodlet. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. + +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . ''' Re-Impl of multiprocessing.reduction.sendfds & recvfds, using acms and trio diff --git a/tractor/linux/eventfd.py b/tractor/linux/eventfd.py index 0c05260e..f262c051 100644 --- a/tractor/linux/eventfd.py +++ b/tractor/linux/eventfd.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . ''' -Linux specifics, for now we are only exposing EventFD +Expose libc eventfd APIs ''' import os