title: Are java and/or android events concurrent?
body: <p>I'm trying to make an android app using some of the mobile's sensors. I was thinking some like this.</p>
  
  <pre><code>public class ListenerSensores implements SensorEventListener {
  
     LinkedBlockingQueue&lt;float[]&gt; acelerations = new LinkedBlockingQueue();
  
      public void onSensorChanged (SensorEvent event) {
          //Add event values to the data structure
      }
  
    private ArrayList&lt;float[]&gt; obtainLastXValues(LinkedBlockingQueue&lt;float[]&gt; queue, int amount) {
  
      ArrayList&lt;float[]&gt; values = new ArrayList&lt;float[]&gt;();
  
      for (int i = 0; i &lt; amount; ++i) {
        while(queue.isEmpty()){
          //wait
        }
  
        float data[] = new float[4];
        data = queue.poll();
        float thing[] = {data[0], data[1], data[2], data[3]};
        values.add(thing);
      }
  
      return values;
    }
  </code></pre>
  
  <p>Should I use something LinkedBlockingQueue or something simpler like LinkedList would work?</p>