Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Usage of threads in Pixelated user agent and its dependencies

Luciano Ramalho edited this page Aug 3, 2016 · 7 revisions

Thread pools

twisted.reactor thread pool

Configured

In pixelated/application.py, functions _start_in_multi_user_mode and start_user_agent_in_single_user_mode.

Used

  1. service/pixelated/resources/contacts_resource.py: ContactsResource.render_GET:

     d = deferToThread(lambda: _search_engine.contacts(query))
    
  2. service/pixelated/resources/tags_resource.py: TagsResource.render_GET:

     d = deferToThread(lambda: _search_engine.tags(query=query, skip_default_tags=skip_default_tags))
    
  3. service/pixelated/resources/auth.py: LeapPasswordChecker.requestAvatarId

      d = threads.deferToThread(_validate_credentials)