search for: timemodule

Displaying 4 results from an estimated 4 matches for "timemodule".

Did you mean: somemodule
2020 Aug 05
5
[PATCH NOT WORKING nbdkit 0/3] python: Allow thread model to be set from Python plugins.
...ibpthread.so.0 #9 0x00007fc4b9c55b23 in clone () from /lib64/libc.so.6 Thread 4 (Thread 0x7fc4ab221640 (LWP 109868)): #0 0x00007fc4b9c4d1bb in select () from /lib64/libc.so.6 #1 0x00007fc4b95321e9 in pysleep (secs=<optimized out>) at /usr/src/debug/python3.9-3.9.0~b3-1.fc33.x86_64/Modules/timemodule.c:1909 #2 time_sleep (self=<optimized out>, obj=<optimized out>) at /usr/src/debug/python3.9-3.9.0~b3-1.fc33.x86_64/Modules/timemodule.c:341 #3 0x00007fc4b9451a62 in cfunction_vectorcall_O (func=<built-in method sleep of module object at remote 0x7fc4abc41540>, args=0x7fc4abc3ff...
2020 Aug 05
0
[PATCH nbdkit 4/4] python: Test the parallel thread model.
...# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# Python plugin which uses the parallel thread model. Note that the +# cpython implementation of time.sleep releases the GIL (see +# Modules/timemodule.c:pysleep) + +import nbdkit +import time + +def thread_model(): + return nbdkit.THREAD_MODEL_PARALLEL + +def open(readonly): + return {} + +def get_size(h): + return 512 + +def pread(h, count, offset): + time.sleep(10) + return bytearray(count) -- 2.27.0
2020 Aug 05
5
[PATCH nbdkit 3/4] python: Allow thread model to be set from Python plugins.
This is working for me now, although possibly only on Python 3.9. Dan suggested PyEval_InitThreads but that was deprecated in Python 3.7. Rich.
2010 May 17
0
strace log
...= 0 munmap(0x7f731ad05000, 4096) = 0 stat("/usr/lib/xen-3.2-1/bin/time", 0x7fffffff31b0) = -1 ENOENT (No such file or directory) open("/usr/lib/xen-3.2-1/bin/time.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/xen-3.2-1/bin/timemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/xen-3.2-1/bin/time.py", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/xen-3.2-1/bin/time.pyc", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib/xen-3.2-1/bin/../lib...