-
Notifications
You must be signed in to change notification settings - Fork 801
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Multithreading support for time() decorators Fixes #287 Signed-off-by: Zaar Hai <[email protected]> * Installing futures package for Python 2.x Required for multithreading tests. Signed-off-by: Zaar Hai <[email protected]> * Py2.x unittest compatability Signed-off-by: Zaar Hai <[email protected]> * Fixing text environment for Py27 multithread Signed-off-by: Zaar Hai <[email protected]> * pypy needs futures for testing as well It's a 2.7 version of Python lang. Signed-off-by: Zaar Hai <[email protected]> * Ensuring that different instances of timer do not interfere Signed-off-by: Zaar Hai <[email protected]> * Python2.6 compliance Signed-off-by: Zaar Hai <[email protected]> Python2.6 compliance take 2 Signed-off-by: Zaar Hai <[email protected]> * Using new object instead of thread local storage It makes time() decorated functions reentrant. It's a bit slower than TLS version, but for only 0.12us (micro) per iteration - it worth the reentrancy and it's also IMHO a more clear and pythonic. Signed-off-by: Zaar Hai <[email protected]>
- Loading branch information
1 parent
f2436ca
commit 889a6fb
Showing
3 changed files
with
125 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters