google.appengine.api.background_thread.background_thread module

Summary

Background Threads API.

An API for creating background threads.

Background threads created using this API do not inherit the context of their creator and do not need to end before the creator request completes.

Contents

google.appengine.api.background_thread.background_thread.start_new_background_thread(target, args, kwargs=None)source

Starts a new background thread.

Creates a new background thread which will call target(*args, **kwargs).

Parameters
  • target – A callable for the new thread to run.

  • args – Position arguments to be passed to target.

  • kwargs – Keyword arguments to be passed to target.

Returns

The thread ID of the background thread.

class google.appengine.api.background_thread.background_thread.BackgroundThread(group=None, target=None, name=None, args=(), kwargs=None, verbose=None)source

Bases: threading.Thread

A threading.Thread-like interface for background threads.

start()source

Starts this background thread.

exception google.appengine.api.background_thread.background_thread.Errorsource

Bases: exceptions.Exception

Base exception class for this module.

exception google.appengine.api.background_thread.background_thread.FrontendsNotSupportedsource

Bases: google.appengine.api.background_thread.background_thread.Error

Error raised when a background thread is requested on a front end.

exception google.appengine.api.background_thread.background_thread.BackgroundThreadLimitReachedErrorsource

Bases: google.appengine.api.background_thread.background_thread.Error

Error raised when no further active background threads can be created.

本頁內容對您是否有任何幫助?請提供意見:

傳送您對下列選項的寶貴意見...

這個網頁
App Engine standard environment for Python 2