Comment made by: lprefontaine
I find this feature interesting but I read the implementation and find it complex.
I would like to simplify it. The count may be done at all times even without the throttling
I would pass a different wrapper in do-trace-var* depending if the throttling feature is
required or not instead of testing the throttle feature at runtime every time.
I may also want to preserve existing fns that have been made public in the past.
The top level call could be a bit more specific than trace-opts.
Will think about a name. Maybe having top level calls more explicit will make
things clearer and easier to implement while preserving backward compat.
Can you shed some light on why you need a dosync in the throttler ?
I reread the code three/four times but cannot wrap my mind as to why a simple atom
with swap! does not do the job here.
All your refs are in the local scope of the throttler fn, nothing leaks out as far as I can
see. (It's late however...:)