You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The major downside of code sharing is performance overhead (I've
noticed it in profiler) in an unbounded queue: `clone`/`drop` of
`UnboundedSender` perform unnecessary atomic increment/decrement
of `num_senders` field
The downside of this patch is the increase of LOC because of a
copy-paste of `next_message` function.
`next_message` functions could be merged if `unpark_one()` and
`dec_num_messages()` calls could be swapped. And I don't see why
`dec_num_messages()` cannot be called before `unpark_one()`. However
the original comment by Carl Lerche says that the order is
important, so I decided to keep it as is.
193b53a
0 commit comments