I'm not sure len(l.listeners) is thread safe in the presence of concurrent writes - think it needs a readlock.