| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
|
|
|
| |
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Add wrappers for some common Python modules so that the code can run
on both Python2 and Python3.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Add support for performing Python gc work only from the main reactor
thread and only when it appears the main thread is idle.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Make sure to terminate any greenlets that are in a pause() state.
This is necessary to ensure the reactor can be deallocated.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
The existence of a __del__() method prevents deallocation on python2
if there are circular references. Replace the __del__() method with a
new finalize() call and arrange for it to be called when the main
reactor is released.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Make sure to update self._next_timer on greenlet start/stop.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Add a mutex object that implements simple queing mutual exclusion for
greenlets.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
|
|
|
|
|
|
|
| |
Add the ability to register callbacks - both asynchronous (ie, from
another thread) and synchronous.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Only set the self._process flag in run() not _dispatch_loop().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
If the reactor isn't running then implement pause using the system
sleep command. This simplifies the users of pause().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The normal system clock can have sudden jumps if the system clock is
changed. Use the system monotonic clock to avoid these sudden changes
in time.
It appears the Raspbian OS (which is used by OctoPi) is setup to
update the system clock upon network connectivity. This could cause
sudden system clock changes which could lead to Klippy processing
errors. Using the monotonic clock eliminates these issues.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Fix a bug causing timers to be delayed when pause() is called from a
fd event. The eventtime needs to be reloaded when an old greenlet is
reactivated.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Add support for greenlets - a mechanism for tasks that can pause while
still allowing regular reactor events to occur.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|