title: What is 'assert self._self_reading_future is None'? (Asyncio)
body: <p>I am currently trying to run a bokeh server application to do real-time plotting, however I keep getting an assertion error from asyncio that states:</p>
  <pre><code>assert self._self_reading_future is None
  </code></pre>
  <p>This occurs not only when I use my own program, but also when I use example programs that others have made, like the one over <a href="https://stackoverflow.com/questions/45192698/running-bokeh-server-programmatically-to-show-in-browser-locally/45241286">here</a>. The only place I've managed to find any use of <code>self_reading_future</code> was from asyncio's code on github, yet even after reading through the code I just can't seem to figure out what it means or does. Could someone enlighten me on what I am doing wrong?</p>
  <p>EDIT: I'm adding what is printed out in the console when I run the code. Again, the error occurs for whatever program I run, but for the sake of showing some code, here is an example:</p>
  <pre><code>from bokeh.layouts import column
  from bokeh.models import ColumnDataSource, Slider
  from bokeh.plotting import figure
  from bokeh.server.server import Server
  from bokeh.themes import Theme
  
  from bokeh.sampledata.sea_surface_temperature import sea_surface_temperature
  
  def modify_doc(doc):
      df = sea_surface_temperature.copy()
      source = ColumnDataSource(data=df)
  
      plot = figure(x_axis_type='datetime', y_range=(0, 25), y_axis_label='Temperature (Celsius)',
                    title=&quot;Sea Surface Temperature at 43.18, -70.43&quot;)
      plot.line('time', 'temperature', source=source)
  
      def callback(attr, old, new):
          if new == 0:
              data = df
          else:
              data = df.rolling('{0}D'.format(new)).mean()
          source.data = ColumnDataSource(data=data).data
  
      slider = Slider(start=0, end=30, value=0, step=1, title=&quot;Smoothing by N Days&quot;)
      slider.on_change('value', callback)
  
      doc.add_root(column(slider, plot))
  
      doc.theme = Theme(filename=&quot;theme.yaml&quot;)
  
  # Setting num_procs here means we can't touch the IOLoop before now, we must
  # let Server handle that. If you need to explicitly handle IOLoops then you
  # will need to use the lower level BaseServer class.
  server = Server({'/': modify_doc}, num_procs=1)
  server.start()
  
  if __name__ == '__main__':
      print('Opening Bokeh application on http://localhost:5006/')
  
      server.io_loop.add_callback(server.show, &quot;/&quot;)
      server.io_loop.start()
  </code></pre>
  <p>and this is what is printed out in the console:</p>
  <pre><code>server.io_loop.start()
  
  self.asyncio_loop.run_forever()
  
  File &quot;Location&quot;, line 314, in run_forever
  assert self._self_reading_future is None
  
  AssertionError
  </code></pre>