安装gevent,Lion上 2011-10-16 咿咿呀呀 技术文章 不出所料,凡是带本地绑定的Python库,在Mac上多多少少都别扭一些。 今天是pip install gevent的时候出错: 继续阅读
Biased Locking && Bulk Rebiasing 2011-05-31 他山之石 技术文章 也是老东西了…以前没有整理记录的习惯,哎。 Early research utilized property that mostsynchronization in Java language is uncontended. not only uncontended,but unshared Most objects locked / unlocked by exactly one thread inthe object’s lifetime Avoid creation of mutex/condvar per Java object. ——不是完全免费的 Compare-and-swap / compare and exchange “Inflate” to full heavyweight monitor if contention detected Previous: First thread locking the object reserves the lock with an atomic operation Subsequent locks / unlocks by that thread use no atomic operations Recursion count in object header detects IllegalMonitorStateException Using non-atomic stores If another thread locks the object, relativelyexpensive unreservation required Involves sending signal to reservation owner thread Ensures reservation owner thread not performing concurrent non-atomic stores New Store-Free Biased Locking Bulk rebiasing and bulk revocation Epoch-based bulk rebiasing