smol-rs / event-listener

Notify async tasks or threads
Apache License 2.0
449 stars 30 forks source link

expose listener count #106

Closed beckend closed 10 months ago

beckend commented 11 months ago

Using this as a base to create libraries, it's very useful to know the listener count from time to time.

notgull commented 10 months ago

This can be done with relative ease on std platforms, but on no_std it's impossible to know how many listeners are in the last at any given time.

beckend commented 10 months ago

Sure, then a feature flag?

notgull commented 10 months ago

It sounds fine to restrict it to std only. I'll accept a PR

beckend commented 10 months ago

PR is online