Skip to content
This repository was archived by the owner on Apr 14, 2024. It is now read-only.

Commit 9770bb3

Browse files
committed
Merge branch 'py23'
2 parents 06de91a + 53e218e commit 9770bb3

21 files changed

+233
-1461
lines changed

Diff for: README.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## async
2+
Async aims to make writing asynchronous processing easier. It provides a task-graph
3+
with interdependent tasks that communicate using blocking channels, allowing
4+
to delay actual computations until items are requested.
5+
Tasks will automatically be distributed among 0 or more threads for the actual computation.
6+
7+
Even though the GIL effectively prevents true concurrency, operations which block,
8+
such as file IO, can be sped up with it already. In conjunction with
9+
custom c extensions which release the GIL, true concurrency can be obtained as well.
10+
11+
## REQUIREMENTS
12+
13+
* Python Nose - for running the tests
14+
15+
Interpreter versions:
16+
17+
* 2.6
18+
* 2.7
19+
* 3.X
20+
* **NOTE:** it doesn't seem to work deterministically in this version, and must be avoided
21+
22+
## DEVELOPMENT STATUS
23+
24+
[![Build Status](https://travis-ci.org/gitpython-developers/async.svg)](https://travis-ci.org/gitpython-developers/async)
25+
[![Coverage Status](https://coveralls.io/repos/gitpython-developers/async/badge.png)](https://coveralls.io/r/gitpython-developers/async)
26+
27+
Development was discontinued, as there are much better alternatives, like zeromq.
28+
29+
**Async is considered useless (by me, the author) as the GIL will prevent anything good from happening (it gets slower instead of faster in multi-threaded mode ;)). Please do not use this project, which can be considered nothing more than an exercise I did years ago.**
30+
31+
## SOURCE
32+
The source is available in a git repository at gitorious and github:
33+
34+
git://github.com/gitpython-developers/async.git
35+
36+
Run the tests with
37+
cd async
38+
nosetests
39+
40+
## MAILING LIST
41+
42+
http://groups.google.com/group/git-python
43+
44+
## ISSUE TRACKER
45+
46+
https://github.com/gitpython-developers/async/issues
47+
48+
## LICENSE
49+
50+
New BSD License

Diff for: README.rst

-42
This file was deleted.

Diff for: async/__init__.py

-37
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,7 @@
44
# the New BSD License: http://www.opensource.org/licenses/bsd-license.php
55
"""Initialize the multi-processing package"""
66

7-
#{ Initialization
8-
def _init_atexit():
9-
"""Setup an at-exit job to be sure our workers are shutdown correctly before
10-
the interpreter quits"""
11-
import atexit
12-
from . import thread
13-
atexit.register(thread.do_terminate_threads)
14-
15-
def _init_signals():
16-
"""Assure we shutdown our threads correctly when being interrupted"""
17-
import signal
18-
from . import thread
19-
import sys
20-
21-
prev_handler = signal.getsignal(signal.SIGINT)
22-
def thread_interrupt_handler(signum, frame):
23-
thread.do_terminate_threads()
24-
if isinstance(prev_handler, collections.Callable):
25-
prev_handler(signum, frame)
26-
raise KeyboardInterrupt()
27-
# END call previous handler
28-
# END signal handler
29-
try:
30-
signal.signal(signal.SIGINT, thread_interrupt_handler)
31-
except ValueError:
32-
# happens if we don't try it from the main thread
33-
sys.stderr.write("Failed to setup thread-interrupt handler. This is usually not critical")
34-
# END exception handling
35-
36-
37-
#} END init
38-
39-
_init_atexit()
40-
_init_signals()
41-
42-
437
# initial imports
448
from .task import *
459
from .pool import *
4610
from .channel import *
47-
import collections

Diff for: async/channel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import threading
2525
import sys
2626

27-
__all__ = ('Channel', 'SerialChannel', 'Writer', 'ChannelWriter', 'CallbackChannelWriter',
27+
__all__ = ( 'Channel', 'SerialChannel', 'Writer', 'ChannelWriter', 'CallbackChannelWriter',
2828
'Reader', 'ChannelReader', 'CallbackChannelReader', 'mkchannel', 'ReadOnly',
2929
'IteratorReader', 'CallbackReaderMixin', 'CallbackWriterMixin')
3030

Diff for: async/mod/__init__.py

-4
This file was deleted.

0 commit comments

Comments
 (0)