         o 'isAlive()Z', (rs) -> false
         o 'start0()V', (rs) -> # NOP
         o 'sleep(J)V', (rs, millis) ->
-            if rs.resuming_stack?
-              rs.resuming_stack = null
-            else
-              throw new util.YieldException (cb) ->
-                setTimeout(cb, millis.toNumber())
+            rs.curr_frame().resume = -> # NOP
+            throw new util.YieldException (cb) ->
+              setTimeout(cb, millis.toNumber())
       ]
       Throwable: [
         o 'fillInStackTrace()L!/!/!;', (rs, _this) ->

        return m.run(runtime_state)
      params = @take_params caller_stack
      runtime_state.meta_stack.push(new runtime.StackFrame(this,params,[]))
      padding = (' ' for [2...runtime_state.meta_stack.length]).join('')
    sig = "#{@class_name}::#{@name}#{@raw_descriptor}"
    debug "#{padding}entering method #{sig}"
    # check for trapped and native methods, run those manually
    if trapped_methods[sig]
      @run_manually trapped_methods[sig], runtime_state
    else if @access_flags.native
      if sig.indexOf('::registerNatives()V',1) >= 0 or sig.indexOf('::initIDs()V',1) >= 0

      ]
      FileInputStream: [
        o 'available()I', (rs) -> 1 # TODO
        o 'readBytes([BII)I', (rs, _this, byte_arr, offset, n_bytes) ->
            result = null # will be filled in after the yield
            rs.curr_frame().resume = -> result
            throw new util.YieldException (cb) ->
              rs.async_input n_bytes, (bytes) ->
                byte_arr.array[offset...offset+bytes.length] = bytes
                result = bytes.length
                cb()
      ]
      ObjectStreamClass: [
        o 'initNative()V', (rs) ->  # NOP
