exAspArk / batch-loader

:zap: Powerful tool for avoiding N+1 DB or HTTP queries
https://engineering.universe.com/batching-a-powerful-way-to-solve-n-1-queries-every-rubyist-should-know-24e20c6e7b94
MIT License
1.04k stars 52 forks source link

Don't sync on #tap #82

Open tjwallace opened 2 years ago

tjwallace commented 2 years ago

Sometimes #tap is used just for code style and the value is never checked, so don't sync the value unnecessarily.

(Contrived) Example:

lazy_fetch(1).tap { logger.info('lazy_fetch complete') }