Future and Promise are the two separate sides of an asynchronous operation.

promise is used by the "producer/writer" of the asynchronous operation.

future is used by the "consumer/reader" of the asynchronous operation.

 

1.

GenericFutureListener.operationComplete(Future) is directly called by an I/O thread. Therefore, performing a time consuming task or a

blocking operation in the handler method can cause an unexpected pause during I/O. If you need to perform a blocking operation on I/O completion,

try to execute the operation in a different thread using a thread pool.

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2022-01-26
  • 2021-09-24
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-06
  • 2022-12-23
  • 2021-07-01
  • 2022-12-23
  • 2021-11-17
  • 2021-06-29
相关资源
相似解决方案