robin
03/15/2017, 2:33 PMelizarov
03/15/2017, 2:40 PMUnconfined dispatcher, though, because with unconfined dispatcher a cancel invocation can start executing the finally sections of the block and doing this under your synchronized section might cause you problems down the road with the order between other locks you might be using in your app. If you are into the defensive-programming mindset, I'd recommend moving cancel invocation outside of synchronized block.robin
03/15/2017, 2:59 PM