Refactor threadlocal code.
Refactor threadlocal code.

Dipsomaniac/peewee,lez/peewee,Dipsomaniac/peewee,jnovinger/peewee,new-xiaji/peewee,Sunzhifeng/peewee,d1hotpep/peewee,jarrahwu/peewee,fuzeman/peewee,bopo/peewee,zhang625272514/peewee,teserak/peewee,coreos/peewee,mackjoner/peewee,coleifer/peewee,jarrahwu/peewee,coreos/peewee,zhang625272514/peewee,bopo/peewee,Sunzhifeng/peewee,zhang625272514/peewee,jarrahwu/peewee,wenxer/peewee,coreos/peewee,wenxer/peewee,bopo/peewee,ghukill/peewee,Dipsomaniac/peewee,coleifer/peewee,ronyb29/peewee,stas/peewee,softside/peewee,d1hotpep/peewee,new-xiaji/peewee,coleifer/peewee,py4a/peewee,Sunzhifeng/peewee,jnovinger/peewee,new-xiaji/peewee,fuzeman/peewee