Skip to content

Tag: multithreading

Distribute Range of Numbers between each threads

Config File I have a config file above in which I have number of threads I want to use and the client instance is able to use ID range from 1 to 1000 and suppose the client threads is set at 10, so each thread would have range of 100 id’s(basically by dividing end range with thread size) that it

Synchronized keyword and static classes in java

I was reading a threading tutorial that’s originally from (I believe) the IBM developerworks site. In it they talked about the synchronized keyword and how a synchronized block of code is locked by the actual object, not the block of code itself. For instance, in the code below the authors state that even tho…