Skip to content

zb: Connection now Send + Sync

Zeeshan Ali Khan requested to merge send-conn into master

Sometimes you need a lot of connections from different threads and life is harder for app developers if they can't pass Connection instances across threads. This patch makes Connection implement Send to allow that but we also get Sync implemented as a bonus.

NB: Strictly-speaking this breaks API by adding Send requirement on default handler in Connection but AFAIK nobody is even using that API so the chances of it actually breaking existing code are very low. Also, we should deprecate that API since it's not really needed after we started to queue messages in Connection.

Fixes #105 (closed).

Merge request reports

Loading