Best Practice for killing a JavaME 1.2 thread?

后端 未结 3 1406
伪装坚强ぢ
伪装坚强ぢ 2021-01-22 14:43

Question: I\'m interested to know the best practice for killing a long standing operation that is running as a background thread (lets call this thread Wo

3条回答
  •  误落风尘
    2021-01-22 15:01

    Well, the best practice would normally be to get the connection to close, and then let the consequences of that ripple through to the thread, allowing it to exit cleanly.

    How are you making the connection? Rather than waiting for it to time out, what are your chances of forcing it to close? Can you get hold of some connection object? Does the Blackberry have some other command that can be executed to kill a given connection?

提交回复
热议问题