This file contains hidden or 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
diff --git a/gevent/greenlet.py b/gevent/greenlet.py | |
index 93076db..351aac6 100644 | |
--- a/gevent/greenlet.py | |
+++ b/gevent/greenlet.py | |
@@ -156,6 +156,20 @@ class Greenlet(greenlet): | |
self._notifier = None | |
self._start_event = None | |
+ current = getcurrent() | |
+ self._leader = getattr(current, "_leader", None) |
This file contains hidden or 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
#!/usr/bin/env python | |
# only works with patched gevent from http://github.com/schmir/gevent | |
from gevent import tlmonkey | |
tlmonkey.patch_all() | |
import gevent | |
from gevent import tpool | |
import sys |
This file contains hidden or 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
#! /usr/bin/env python | |
import sys, os, signal, getopt, time | |
base_cgroup = "/cgroup" | |
def get_pids(name): | |
pids = open(os.path.join(base_cgroup, name, "tasks")).read().split() | |
return pids |
This file contains hidden or 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
# Last-changed: 2010-07-29 00:39:14 by ralf | |
""" | |
this module installs a custom __import__ function, which switches | |
sys.modules on a per-thread basis. patch_all must be called from the | |
gevent thread. the threads will only import unpatched modules. | |
""" | |
import imp, sys, threading |
This file contains hidden or 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
;;; cwc.el --- whitespace-cleanup only for changed lines | |
;; | |
;; Author: Ralf Schmitt <[email protected]> | |
;; Version: 0.1 | |
;; Last Changed: 2010-04-13 17:03:32 by ralf | |
;;; Commentary: | |
;; | |
;; run whitespace-cleanup only on changed lines in a buffer. needs | |
;; highlight-changes mode to do it's work. |
NewerOlder