title: Are Kotlin channels used in coroutines thread safe / synchronized / keep happens-before relationship?
body: <p>Are the functions available in Kotlin channels thread safe? e.g.</p>
  
  <pre><code>val channel = Channel&lt;Boolean&gt;()
  val job1 = GlobalScope.launch {
      channel.send(true)
  }
  val job2 = GlobalScope.launch {
      val x = channel.poll()
  }
  </code></pre>
  
  <p>If in the above code <code>job1</code> was executed by the machine (in real time) before <code>job2</code> is executed and on different threads, is it guaranteed that <code>x</code> is set with <code>true</code>? Or is it possible that it gets set with <code>null</code> (because cpu cache was not updated)?</p>