piface / pifacecommon

Common functions for interacting with PiFace products
GNU General Public License v3.0
42 stars 31 forks source link

Support varying listeners #15

Closed jrmhaig closed 10 years ago

jrmhaig commented 10 years ago

I encountered a problem while changing listeners during a callback function whereby sometimes the function would be executed twice. I found that it was due to the list of functions to execute in 'handle_events' is stored as a filter but the thing that the filter is based on was changing underneath it. Using a list appears to solve the problem.