retry4j icon indicating copy to clipboard operation
retry4j copied to clipboard

Mark CallExecutor as ThreadUnsafe or force user to create CallExecutor in every execute call to avoid data race

Open jeremyfu-aws opened this issue 2 years ago • 1 comments

Since CallExecutor has status as instance variable to store result, it is needed to create new CallExecutor in every execute call, otherwise it could cause data race under multi-threaded environment.

In order to avoid the misuse of CallExecutor, please consider to

  • add ThreadUnsafe annotation on CallExecutor
  • or implement in a way which forces users to create new CallExecutor in every execute call

jeremyfu-aws avatar Jun 14 '23 00:06 jeremyfu-aws

@jeremyfu-aws i am no longer going to be maintaining retry4j - however please feel free to fork and make whatever changes you'd like

elennick avatar Jun 21 '23 01:06 elennick