-
Notifications
You must be signed in to change notification settings - Fork 0
SimpleObserver test not present #1
Comments
The signal module is taken from the phobos review queue and was proposed to replace std.signal in phobos (it was rejected in the first voting). The code is not modified and the best place to discuss it is probably the review thread. As alternatives I can suggest the eventing framework in vibe.d, a (imperfect) solution I wrote - pubsub.d or the solution I currently work on - nitro (unfortunately lacks documentation at the moment). |
For what I need, your pubsub would be just perfect, I only need to adapt the publish and callSubscribers to move structs or other lvalues by reference. Nitro seems like it has its own event loop? and I already had something in mind for extension handling to install components. They need to be registered in vibe.d routers pre-runtime which makes it more complicated |
I'd gladly accept a pull request like that. pubsub.d is not very efficient at the moment and I stopped using it for my current project but that would be the the next important step. |
I'm looking at https://github.com/Orvid/std.event for the moment, it looks like pub/sub with return types but without wildcards. Could that be the only difference? |
https://github.com/Orvid/std.event seems to be a wrapper for for a delegate array. nitro can be used with a cusom run loop: just don't use nitro.gen. |
I can't see any tests for SimpleObserver in stdx.signals, it's not fully obvious that omitting some function parameters would be acceptable for a valid observable.
On a side note, I'm wondering if the mixins could be replaced by something more simple. I intend on using this signals library for the web development framework I'm developing. Without seeing this library, I had a vision of something like
Where Event would be a template like this:
template Event(string Name, OUT, IN...) { }
Being able to request info while emitting is something I really need, because some routines could be skipped/aborted/modified by some other libraries compiled against other libraries (completely different programs). For example, it could allow writing plugins that attach to hooks and add data to the routines there..
But, sending some arguments as ref would also do.
The text was updated successfully, but these errors were encountered: