More efficient handling of accepted connections in the correct thread