Git Product home page Git Product logo

evergreen's People

Contributors

andrew-d avatar raulduc avatar saghul avatar schlamar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evergreen's Issues

evergreen.EventLoop() lauches exception

Hi saghul,

I've just installed evergreen to have a look and perform basic tests:

cat /etc/issue

Ubuntu 14.04.1 LTS

pip install evergreen

Downloading evergreen-0.1.0.tar.gz
Downloading fibers-0.4.0.tar.gz
Downloading pyuv-1.0.1.tar.gz

but I've been stopped at first step:

python

import evergreen
loop=evergreen.EventLoop()

Traceback (most recent call last):
File "", line 1, in
File "/home/francois/.local/share/virtualenvs/py2/local/lib/python2.7/site-packages/evergreen/core/loop.py", line 126, in init
self._ready_processor.unref()
AttributeError: 'pyuv.Check' object has no attribute 'unref'

I thought probably an evergreen/pyuv version mismatch :)
But now that I checked, there seems to be a single version of pyuv available on pypi:

pip install yolk
yolk -V pyuv

pyuv 1.0.1

If you can have a look ?

François

'pyuv._cpyuv.Check' object has no attribute 'unref'

when i using evergreen == 0.1.0 , i install it with pip

pip install evergreen
and it install pyuv == 1.3.0, and it try this example:

#!/usr/bin/env python
# encoding: utf-8
import evergreen

# Create the global loop
loop = evergreen.EventLoop()

# Start the loop
loop.run()

it get following error:

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    loop = evergreen.EventLoop()
  File "/home/yetship/.virtualenvs/evergreen/lib/python2.7/site-packages/evergreen/core/loop.py", line 126, in __init__
    self._ready_processor.unref()
AttributeError: 'pyuv._cpyuv.Check' object has no attribute 'unref'

Futures?!

I really dislike the complete future approach in evergreen. Generally the concept is great (compared to callback passing style), but in this case you are mixing two programming models: greenlets vs. futures.

I would like to see that threads and processes have the same interface than a task. So you would do:

t = loop.spawn_[task|thread|process](func, *args, **kwargs)
t.join()
t.result
t.get()  # shortcut to join + result

p = loop.spawn_ext_process(cmd_args, stdout=True)
for line in p.stdout:
    print line

Internally you should use libuv's thread pool and process capabilities which should be more efficient than the concurrent.futures implementation.

Cross-thread Queue

Hi there,

I'm using Evergreen in a project of mine, and I'm running into a strange edge case. Long story short, I need to read from a TUN/TAP device on Mac OS X. If you do pretty much anything except calling select() on the device, you get errno = 35. So, I tried calling select() from a regular Thread, reading the data that shows up, and then putting it on a queue (see here). However, I get an RuntimeError('there is no event loop created in the current thread'), which makes sense. However, I don't know of any other way to do this - sending data to a task from another thread without blocking the entire event loop. Any suggestions?

Thanks!

Dead-locking test cases on Windows

There are multiple test cases dead-locking on Windows:

  • test_future_wait_multiple_wait_first (test_futures.FuturesTests)
  • test_stop2 (test_loop.LoopTests)
  • test_task_join_timeout (test_tasks.TasksTests)
  • test_timeout (test_timeout.TimeoutTests)

Any idea?

Failing UDP test on Windows

test_udp_ping_pong (test_io.IOTests) ... Traceback (most recent call last):
  File "../evergreen\core\loop.py", line 372, in _process_ready
    handler._run()
  File "../evergreen\core\loop.py", line 47, in _run
    self._callback(*self._args, **self._kwargs)
  File "../evergreen\locks.py", line 58, in _notify_waiters
    waiter.switch()
  File "../evergreen\tasks.py", line 135, in __run
    self.run()
  File "../evergreen\tasks.py", line 87, in run
    self._target(*self._args, **self._kwargs)
  File "c:\Users\schlaich\Documents\GitHub\evergreen\tests\test_io.py", line 178, in connect
    client.send(b'PING', TEST_SERVER)
  File "../evergreen\io\udp.py", line 42, in send
    f.get()
  File "../evergreen\futures\_base.py", line 341, in get
    return self._get_result()
  File "../evergreen\futures\_base.py", line 356, in _get_result
    raise self._exception
UDPError: (6, 'address not available')

Mismatch in code and documentation

Hi,
Just find out that in your documentation, the design part, it mentioned that the Task class is implemented using the greenlet library.
But in the tasks.py, the Task class is using python-fibers instead of greenlet.
I think some people will be confused when reading the document and tracing the source code.
Just to notify this small issue, not sure it is the right place to report this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.