title: Calling a method in multiple threads
body: <p>Let's say I have ThreadPoolExecutor and BlockingQueue in the class:</p>
  <pre><code>class Test {
  private final SomeSharedData sharedField;
  
  private OkHttpClient httpClient;
  private ThreadPoolExecutor executor;
  private BlockingQueue&lt;String&gt; blockingQueue;
  
  public void doWork(){ 
    ...
  }
  
  }
  </code></pre>
  <p>And in this class I have method <code>doWork()</code> that is reading from this queue in a <code>while(true)</code> loop. It is doing some work with HTTP and <code>sharedField</code>. Is it okay if I will add in the executor multiple callings of this method? Like this:</p>
  <pre><code>executor.execute(this::doWork);
  executor.execute(this::doWork);
  </code></pre>
  <p>Is it normal way to use it like this, I'm concerned because the threads will be using one method of the same object, or should I write a class that will implement runnable with <code>doWork()</code> logic (normal way)? I know, there might be a problem with synchronization, because threads will be working with the fields of this object, but I will synchronize the fields I need when I'm using them, if I do it, is it normal to use it like this or there might be another problems?</p>