tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

[Q] Is Java Client production ready? #2979

Closed ya-ne-vor closed 3 months ago

ya-ne-vor commented 3 months ago

Hi! I want to use TDLib in a Java project. I see the example in example/java folder. Can I just use Client.java and be sure that it's stable enough (meaning most of the time it will work without any issue, e.g. no sudden shutdowns, lost updates, etc)?

Also I have another question: how can I interrupt ResponseReceiver if it has a huge timeout? As I understand the ResponseReceiver spawned as a daemon thread, and it's killed by JVM when exiting. Can I interrupt/terminate ResponseReceiver (or equally nativeClientReceive with a huge timeout) manually? Or, instead, the solution is to set a small timeout?

Thanks!

levlam commented 3 months ago

TDLib is very stable.

There are no reasons to interupt ResponseReceiver manually.

ya-ne-vor commented 3 months ago

There are no reasons to interupt ResponseReceiver manually.

I wanted to write custom runloop, but since Client.java is stable, I think, I can use it and don't invent the wheel.