title: suspending a kotlin Coroutine does not work with volley
body: <p>I wrote following (test) function to talk to the google maps api via volley and with coroutines. Sadly it never finishes when calling it with the suspendCoroutine. If I use the same function, drop the coroutine stuff and implement a "normal" callback, everything works fine. I am kind of at a loss whats the problem here. Is anybody able to help?</p>
  
  <p>Code executes until Log.d(LOGTAG, "AFTERAFTER"), but never reaches Log.d("findNaturalLocations", "Response: " + response)</p>
  
  
  
  <pre><code>suspend fun testNaturalLocations(tag: Tag, lastKnownUserLocation: 
  Location): ArrayList&lt;CLDistanceRequest&gt; = suspendCoroutine { 
  continuation -&gt;
  
      Log.d("findNaturalLocations", "getDistanceAndTimeBetweenLocations")
  
      var distanceRequests = ArrayList&lt;CLDistanceRequest&gt;()
  
      val mapsBaseUrl = "https://maps.googleapis.com/maps/api/place/nearbysearch/"
      val mapsOutputFormat = "json"
  
      val location = "location=" + lastKnownUserLocation.latitude.toString() + "," + lastKnownUserLocation.longitude.toString()
      val radius = "radius=5000"
      val keyword = "keyword=Supermarket"
      val name = "name=Supermarket"
      val sensor = "sensor=true"
      val apiKey = "key=API_KEY"
  
      val finishedUrl = mapsBaseUrl + mapsOutputFormat + "?" + location + "&amp;" + radius + "&amp;" + keyword + "&amp;" + name + "&amp;" + sensor + "&amp;" + apiKey
  
      Log.d(LOGTAG, finishedUrl)
  
      val jsObjectRequest = JsonObjectRequest(Request.Method.GET, finishedUrl, null,
              Response.Listener&lt;JSONObject&gt; { response -&gt;
                  Log.d("findNaturalLocations", "Response: " + response)
  
                  var results = response.getJSONArray("results")
  
                  // parse distanceRequests, ommitted for brevity
  
                  continuation.resume(distanceRequests)
              },
              Response.ErrorListener { error -&gt;
                  Log.e("Error", error.localizedMessage, error)
  
                  continuation.resumeWithException(error)
              }
      )
  
      Log.d(LOGTAG, "AFTER");
  
      jsObjectRequest.setShouldCache(false)
      CLGlobal.getRequestQueue().add(jsObjectRequest)
  
      Log.d(LOGTAG, "AFTERAFTER");
  }
  </code></pre>
  
  <p>Doing the same with a simple callback works flawlessly.</p>
  
  <pre><code>var i = 0;
      runBlocking {
          val query = async(CommonPool) {
              i = this@CLTaskList.test2()
          }
  
          query.await()
      }
  
  suspend fun test2():Int = suspendCoroutine&lt;Int&gt; { continuation -&gt;
      Log.d("TESTTEST", "TEST2 CALLED")
      test {
          Log.d("TESTTEST", "CONTINUATION")
          continuation.resume(it)
      }
  }
  
  fun test(completionHandler: (Int) -&gt; Unit) {
      Log.d("TESTTEST", "TEST CALLED")
      completionHandler(1)
  }
  </code></pre>