Closed mcdonnelldean closed 9 years ago
@mcollina I've been thinking about his more and I wonder should the default api be:
remove(pattern)
- removes all patterns regardless of payloadremove(pattern, null)
- removes patterns with no payloadremove(pattern, payload)
- removes pattern with matching payloadThe current implementation doesn't really allow annon functions at all, or at least doesn't allow the ability to remove them.
I'm +1 on this semantic. Il giorno lun 14 set 2015 alle 21:37 Dean McDonnell < notifications@github.com> ha scritto:
@mcollina https://github.com/mcollina I've been thinking about his more and I wonder should the default api be:
- remove(pattern) - removes all patterns regardless of payload
- remove(pattern, null) - removes patterns with no payload
- remove(pattern, payload) - removes pattern with matching payload
The current implementation doesn't really allow annon functions at all, or at least doesn't allow the ability to remove them.
— Reply to this email directly or view it on GitHub https://github.com/mcollina/bloomrun/issues/10#issuecomment-140185327.
Awesome, I'll get to it.
Completed as of #11
@mcollina I would like to have the ability to kill all patterns regardless of their payload, I'm not sure how the interface for this should look though. The two options I can think of are:
The use case is when anonymous functions are used but the consumer needs to ensure no handlers of a specific pattern exists. In my case I need to kill certain handlers based on a render cycle.