multithreading - Current thread count while using Executors.newSingleThreadExecutor().execute -
i using executors.newsinglethreadexecutor().execute execute method, inside method copy files drive, after copying, rename file.in file name have name along current thread count i.e if 1st thread file name xxx_1, xxx_2 second , on.is possible implement it?(the naming of file inside calling method) if yes, can please suggest me solution. in advance.
you can use static variable , increment in processing method (the method runs in separate thread)
Comments
Post a Comment