Java 1.4 synchronization: only allow one instance of method to run (non blocking)?

后端 未结 4 964
眼角桃花
眼角桃花 2021-01-20 05:14

I have a class proposing translations utilities. The translations themselves should be reloaded every 30 minutes. I use Spring Timer support for that. Basically, my class lo

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-20 05:54

    Keep a handle on the load thread to see if it's running?

    Or can't you just use a synchronized flag to indicate if a load is in progress?

提交回复
热议问题