Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve thread handling #6

Open
2 tasks
mdickinson opened this issue Mar 29, 2017 · 0 comments
Open
2 tasks

Improve thread handling #6

mdickinson opened this issue Mar 29, 2017 · 0 comments
Labels

Comments

@mdickinson
Copy link
Member

Importing mapping.enable.api starts a long-running thread, and there's no API provided for shutting that thread down.

This should be fixed by:

  • Only starting the thread when it's needed, and not at import time.
  • Providing a way to shut the thread down cleanly.
Python 2.7.10 |Master 2.1.0.dev1829 (64-bit)| (default, Oct 21 2015, 09:09:19) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> threading._active
{140735095477008: <_MainThread(MainThread, started 140735095477008)>}
>>> import mapping.enable.api
2016-12-05 15:06:24.732 Python[39157:d07] CoreText performance note: Client called CTFontCreateWithName() using name "Lucida Grande" and got font with PostScript name "LucidaGrande". For best performance, only use PostScript names when calling this API.
2016-12-05 15:06:24.732 Python[39157:d07] CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug.
>>> threading._active
{140735095477008: <_MainThread(MainThread, started 140735095477008)>, 4727361536: <RequestingThread(Thread-1, started daemon 4727361536)>}
@mdickinson mdickinson added the bug label Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant