Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Rentonn - Airbnb clone 1.0
VisualNEO for Windows 18.08.31.0
SentiVeillance SDK Trial 7.0.191272
dbForge SQL Complete 6.1
Uber for E-Scooters 1.0
ODBC Driver for MySQL 2.4
dbForge Schema Compare for MySQL 4.4
dbForge Studio for MySQL 8.1
dbForge Query Builder for MySQL 4.4
dbForge Data Compare for MySQL 5.5
Aqua Data Studio 19.5
ConyEdit for Windows 1.1.1
GetOrgChart 2.5.3.0
Database Workbench Pro 5.6.0
.Net VCL for Delphi 1.0.0.0
Top Code
MCU 8051 IDE 1.4.7
Readability Analyzer 7.x-1.0-rc2
Cuckoo Search (CS) Algorithm 1.0
C/C++ GRAPHICAL LIBRARY NE 1.0
Faculty Evaluation System 1.1
HTML Color Parser 0.1
Azizi search engine script PHP 4.1.10
PHP Product Order Form 1.0
PHP MLM Software 2.0.1
Restaurant Table Booking System 2.0
jClientUpload 1.0
Online Food Ordeing System 1.0
SimpleForms 1.0
heap sort
Library Management System 1.0
Top Rated
Paste phpSoftPro 1.4.1
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
ATN Mall 2.0
WeBuilder 2015 13.3
actorish decorator for making async code look more like sync one and a less blocking 
File ID: 64228






actorish decorator for making async code look more like sync one and a less blocking 
Download actorish decorator for making async code look more like sync one and a less blocking http://code.activestate.com/recipes/577922-partial-with-out-of-order-arguments/?in=lang-pythonReport Error Link
License: Freeware
Downloads: 5
Submit Rating:
actorish decorator for making async code look more like sync one and a less blocking  Description
Description: I like how gevent is making async code to look like sync but non blocking without all the ugly callbacks.
I tried doing that with threads and object proxy (I found great one at: http://pypi.python.org/pypi/ProxyTypes written by Phillip J. Eby, and this is where the actual magic happens).

For every function that is decorated it returns a proxy and the io call (or anything else) won't block until the value is actually needed.
(should be some pools and args pickling there, to make it more like message passing but I didn't want to fuzzy the example)
To use it as actor model, I guess it would require to queue requests to decorated object's methods and create a single thread to process them an in LazyProxy callback set q.get() instead of t.join()

License: Freeware

Related: actor, threading

O/S:Windows

Downloads: 5



More Similar Code

code2web is a toolkit for converting source code (Java,JavaScript,XML,JSP,SQL and more) to HTML with a wide array of features, including CSS customization, outline generation, automatic documentation liking, selective highlighting and more.



RAD Studio Code Generator represents a set of code generating tools for development IDEs that lack basic code completion features (like generating getters and setters for class members).



A decorator for generators that makes them indexable like a
sequence.



I wanted to make my tag cloud (new with WP 2.3) look more like the one generated by del.icio.us, with a flush margin on both the left and the right. But when I tried to do it, it sucked because the internal spaces in the tags had been replaced by...



A simple .NET signature box for handheld application. Usage of bezier curves makes the resulting signature look more like the pen and paper version.



Do you ever curse Java for making it so ridiculously difficult just to save and load data?
Do you ever say something like the following:
"All I want to do is save the user's data! I don't want to deal with your...



Coati is an open source PHP/MySQL based Content Management System that strives for complete separation of code from content,
ease of use, and a feature rich management system.



JavaGuard is a general purpose bytecode obfuscator, designed to fit effortlessly into your regular build and testing process, providing peace of mind that your valuable Java code is more secure against decompilation and other forms of reverse...



OpenStage is a cross-platform staging process intended to provide a universal staging mechanism for multiple source-code repositories such as CVS, Subversion, and Mercurial.



KeyValue is a cross-platform library for making C++ objects accessible through LibreOffice Calc, Excel and other front-ends. Experience of spreadsheet users is enhanced by an object model and a handy key-value based interface.

User Review for actorish decorator for making async code look more like sync one and a less blocking
- required fields
     

Please enter text on the image