Comments (3)
You're right, that could be confusing for people. I think adding a warning would be sufficient, the other two ideas may have unexpected consequences for current users of this library.
Would you be able to create a Pull Request for this one too? If not we can have a look at adding a warning next week.
from adbus.
It turns our even a simple warning would be quite an invasive change.
For the warning to be useful, intentional deletions need to be distinguished from "accidental" deletions. That means there needs to be some close()
method or something that will be called when the owner of the Listen
is done with it. In Signal
that would for example be in remove()
, when a listener is removed.
But I suspect that most code currently doesn't explicitly remove the listeners when a Signal
goes out of scope. In such a case it is generally not clear if the surrounding code expects the handler function to stop being called or continue to be called. (The actual behaviour that it's called for a while and then stops is probably unexpected for both.)
This problem also applies to anything that might contain a Signal
or Listen
, like Proxy
and even Interface
. The only solution I see is to add some close()
function to all those objects and require it to be called when the owner is done with it. Calling all those close()
functions would of course require a lot of changes in code that uses the library...
from adbus.
We wouldn't want to add that, we use this library within our own system software. We are aware of this limitation and keep proxy in scope for as long as we need to receive signals.
Maybe a not in the readme is the best we can do. I'll add one.
from adbus.
Related Issues (20)
- Please document why the library wants Python >= 3.7. HOT 5
- adbus.sdbus.SdbusError: Failed to enter array b'y' HOT 3
- Segfault in __pyx_f_5adbus_5sdbus_call_callback HOT 11
- Invalid read of size 1 in message.pyx HOT 1
- Python 3.5 compatibility? HOT 2
- NoReply: Method call timed out HOT 13
- Typing problem in `signal2` in the Readme server example code HOT 1
- `depreciated` and `deprectiated` parameters/properties should be spelled `deprecated` HOT 2
- Failed to read value with signature s HOT 10
- new release HOT 1
- systemd dbus activation timeout on first try HOT 3
- travis integration is broken HOT 5
- Watch signal events HOT 2
- getting error while installing on ubuntu HOT 5
- dbus service thread count HOT 5
- Exception caused by typing issue when running example code HOT 2
- DepreciationWarning Python 3.8 HOT 2
- Dbus server method with an unsigned int HOT 5
- Cython compile type errors when trying to install adbus HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adbus.