Demo os App Engine Python 2.7 with Background thread joined after writing response. Deploy to App Engine with the command:
gcloud app deployBrowse to the app
gcloud app browseCheck the logs. Notice that you can write logs to Stackdriver after writing the response to the HTTP stream, even in a different thread.