facebookarchive / swift

An annotation-based Java library for creating Thrift serializable types and services.
Apache License 2.0
900 stars 297 forks source link

Need to handle the case where a sync call is made on the channel's I/O thread #173

Closed andrewcox closed 6 years ago

andrewcox commented 10 years ago

Because connecting returns a future, a common pattern you might try to use is to add a future listener waiting for the successful connect, and in that listener make a thrift call.

However, if you make a blocking thrift call, you will deadlock the netty I/O thread.

We should check this before starting blocking thrift calls, and throw an exception in this case.

ghost commented 9 years ago

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.