saghul / pyuv Goto Github PK
View Code? Open in Web Editor NEWPython interface for libuv
Home Page: https://pyuv.readthedocs.io
License: MIT License
Python interface for libuv
Home Page: https://pyuv.readthedocs.io
License: MIT License
This is great! Have you thought about integrating this with gevent? It'd be really awesome! Right now gevent is using libev (in the development version).
Also, does this run on PyPy? One major blocker for people wanting to move to PyPy is lack of gevent support. If this could be used as the backend for gevent, and if this ran on PyPy, then that'd be pretty great! I know PyPy has some C-API support as well as ctypes support -- though I'm not sure which is faster or prefered.
Looks like Py_GetArgcArgv behaves differently on Python 3... a possible workaround here: http://code.google.com/p/py-setproctitle/source/browse/src/spt_setup.c?r=60346426d4a9ec298878a650279d23a023325743#119
Info here: #12
Not sure if it's intended but when using the kill function the on_exit_cb is always triggered. So event sending SIGHUP trigger it . Also return_code & terM_signal are similar to the results returned by sending SIGTERM using the kill function.
I add a line Sleep(1) or printf(handle->reqs_pending)
before "DECREASE_PENDING_REQ_COUNT() in uv_process_tcp_read_req"
joyent/libuv#599 (comment) will disappear
pyuv extension builded with VS2008
the test case stay in https://gist.github.com/3958226/ff86beb40756d3d625d7ea4b82983b4d1a9a37c8
The following test gives a segmentation fault on Fedora 18.
import os
import stat
from common import unittest2
import pyuv
TEST_FILE = 'test_file_1234'
loop = pyuv.Loop.default_loop()
fd = pyuv.fs.open(loop, TEST_FILE, os.O_RDWR, 0755)
pyuv.fs.write(loop, fd, "TEST", 0) # <= crash here
I get the following stack trace with gdb:
Program received signal SIGSEGV, Segmentation fault.
__memcpy_sse2 () at ../sysdeps/x86_64/memcpy.S:95
95 movl (%rsi), %ecx
(gdb) bt
#0 __memcpy_sse2 () at ../sysdeps/x86_64/memcpy.S:95
#1 0x00007ffff07dab9a in memcpy (__len=<optimized out>, __src=<optimized out>, __dest=0x6ce450) at /usr/include/bits/string3.h:51
#2 FS_func_write (obj=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at src/fs.c:2247
#3 0x000000366bedd281 in call_function (oparg=<optimized out>, pp_stack=0x7fffffffdde8) at /usr/src/debug/Python-2.7.3/Python/ceval.c:4098
#4 PyEval_EvalFrameEx (f=f@entry=Frame 0x6cbe90, for file test.py, line 12, in <module> (), throwflag=throwflag@entry=0)
at /usr/src/debug/Python-2.7.3/Python/ceval.c:2740
#5 0x000000366beddcbf in PyEval_EvalCodeEx (co=co@entry=0x7ffff7f23a30, globals=globals@entry=
{'stat': <module at remote 0x7ffff7f7efa0>, 'TEST_FILE': 'test_file_1234', '__builtins__': <module at remote 0x7ffff7fa1ad0>, 'unittest2': <module at remote 0x7ffff7edb788>, '__file__': 'test.py', '__package__': None, 'fd': 14, 'pyuv': <module at remote 0x726fd8>, '__name__': '__main__', 'os': <module at remote 0x7ffff7f67cc8>, '__doc__': None, 'loop': <pyuv.Loop at remote 0x748578>}, locals=locals@entry=
{'stat': <module at remote 0x7ffff7f7efa0>, 'TEST_FILE': 'test_file_1234', '__builtins__': <module at remote 0x7ffff7fa1ad0>, 'unittest2': <module at remote 0x7ffff7edb788>, '__file__': 'test.py', '__package__': None, 'fd': 14, 'pyuv': <module at remote 0x726fd8>, '__name__': '__main__', 'os': <module at remote 0x7ffff7f67cc8>, '__doc__': None, 'loop': <pyuv.Loop at remote 0x748578>}, args=args@entry=0x0, argcount=argcount@entry=0,
kws=kws@entry=0x0, kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=closure@entry=0x0)
at /usr/src/debug/Python-2.7.3/Python/ceval.c:3330
#6 0x000000366beddd92 in PyEval_EvalCode (co=co@entry=0x7ffff7f23a30, globals=globals@entry=
{'stat': <module at remote 0x7ffff7f7efa0>, 'TEST_FILE': 'test_file_1234', '__builtins__': <module at remote 0x7ffff7fa1ad0>, 'unittest2': <module at remote 0x7ffff7edb788>, '__file__': 'test.py', '__package__': None, 'fd': 14, 'pyuv': <module at remote 0x726fd8>, '__name__': '__main__', 'os': <module at remote 0x7ffff7f67cc8>, '__doc__': None, 'loop': <pyuv.Loop at remote 0x748578>}, locals=locals@entry=
{'stat': <module at remote 0x7ffff7f7efa0>, 'TEST_FILE': 'test_file_1234', '__builtins__': <module at remote 0x7ffff7fa1ad0>, 'unittest2': <module at remote 0x7ffff7edb788>, '__file__': 'test.py', '__package__': None, 'fd': 14, 'pyuv': <module at remote 0x726fd8>, '__name__': '__main__', 'os': <module at remote 0x7ffff7f67cc8>, '__doc__': None, 'loop': <pyuv.Loop at remote 0x748578>}) at /usr/src/debug/Python-2.7.3/Python/ceval.c:689
#7 0x000000366bef6f7a in run_mod (mod=<optimized out>, filename=filename@entry=0x7fffffffe52b "test.py", globals=globals@entry=
{'stat': <module at remote 0x7ffff7f7efa0>, 'TEST_FILE': 'test_file_1234', '__builtins__': <module at remote 0x7ffff7fa1ad0>, 'unittest2': <module at remote 0x7ffff7edb788>, '__file__': 'test.py', '__package__': None, 'fd': 14, 'pyuv': <module at remote 0x726fd8>, '__name__': '__main__', 'os': <module at remote 0x7ffff7f67cc8>, '__doc__': None, 'loop': <pyuv.Loop at remote 0x748578>}, locals=locals@entry=
{'stat': <module at remote 0x7ffff7f7efa0>, 'TEST_FILE': 'test_file_1234', '__builtins__': <module at remote 0x7ffff7fa1ad0>, 'unittest2': <module at remote 0x7ffff7edb788>, '__file__': 'test.py', '__package__': None, 'fd': 14, 'pyuv': <module at remote 0x726fd8>, '__name__': '__main__', 'os': <module at remote 0x7ffff7f67cc8>, '__doc__': None, 'loop': <pyuv.Loop at remote 0x748578>}, flags=flags@entry=0x7fffffffe060, arena=arena@entry=
0x6c8670) at /usr/src/debug/Python-2.7.3/Python/pythonrun.c:1361
#8 0x000000366bef7d72 in PyRun_FileExFlags (fp=fp@entry=0x6c8dc0, filename=filename@entry=0x7fffffffe52b "test.py", start=start@entry=257,
globals=globals@entry=
{'stat': <module at remote 0x7ffff7f7efa0>, 'TEST_FILE': 'test_file_1234', '__builtins__': <module at remote 0x7ffff7fa1ad0>, 'unittest2': <module at remote 0x7ffff7edb788>, '__file__': 'test.py', '__package__': None, 'fd': 14, 'pyuv': <module at remote 0x726fd8>, '__name__': '__main__', 'os': <module at remote 0x7ffff7f67cc8>, '__doc__': None, 'loop': <pyuv.Loop at remote 0x748578>}, locals=locals@entry=
{'stat': <module at remote 0x7ffff7f7efa0>, 'TEST_FILE': 'test_file_1234', '__builtins__': <module at remote 0x7ffff7fa1ad0>, 'unittest2': <module at remote 0x7ffff7edb788>, '__file__': 'test.py', '__package__': None, 'fd': 14, 'pyuv': <module at remote 0x726fd8>, '__name__': '__main__', 'os': <module at remote 0x7ffff7f67cc8>, '__doc__': None, 'loop': <pyuv.Loop at remote 0x748578>}, closeit=closeit@entry=1, flags=flags@entry=0x7fffffffe060)
at /usr/src/debug/Python-2.7.3/Python/pythonrun.c:1347
#9 0x000000366bef878b in PyRun_SimpleFileExFlags (fp=fp@entry=0x6c8dc0, filename=0x7fffffffe52b "test.py", closeit=1, flags=flags@entry=
---Type <return> to continue, or q <return> to quit---
0x7fffffffe060) at /usr/src/debug/Python-2.7.3/Python/pythonrun.c:951
#10 0x000000366bef93c9 in PyRun_AnyFileExFlags (fp=fp@entry=0x6c8dc0, filename=<optimized out>, closeit=<optimized out>, flags=flags@entry=
0x7fffffffe060) at /usr/src/debug/Python-2.7.3/Python/pythonrun.c:755
#11 0x000000366bf09c52 in Py_Main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/Python-2.7.3/Modules/main.c:639
#12 0x0000003652a21a05 in __libc_start_main (main=0x4006f0 <main>, argc=2, ubp_av=0x7fffffffe218, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe208) at libc-start.c:225
#13 0x0000000000400721 in _start ()
This is against the current master (f7859a3).
diff --git a/src/pyuv.h b/src/pyuv.h
index 817507f..de58b12 100644
--- a/src/pyuv.h
+++ b/src/pyuv.h
@@ -562,6 +562,9 @@ handle_uncaught_exception(Loop *loop)
ASSERT(loop);
ASSERT(PyErr_Occurred());
PyErr_PrintEx(1);/_exit app_/
PyErr_Fetch(&type, &val, &tb);
PyErr_NormalizeException(&type, &val, &tb);
When i try to build pyuv 0.8.2 under Windows, it tells me
C:\MinGW\bin\gcc.exe -shared -s build\temp.win32-2.7\Release\src\pyuv.o build\temp.win32-2.7\Release\src\pyuv.def -Lc:\Python27\libs -Lc:\Python27\PCbuild -Ldeps\libuv -lpython27 -luv -liphlpapi -lpsapi -lws2_32 -o d:\pyuv-0.8.2\pyuv.pyd
deps\libuv/libuv.a(core.o): In functionuv_init': d:\pyuv-0.8.2\deps\libuv/src/win/core.c:58: undefined reference to
__set_invalid_parameter_handler'
I look over the related code, and find it's a CRT related code. Since libuv is supporting MSVC officially, it's not surprising.
So i hope you can support msvc asap (i know it's a hard work).
And python setup.py build_ext
in build_inplace
file is not working. I must use python setup.py build
instead, otherwise it will only build libuv but not pyuv, and halt on building 'pyuv' extension
after No need to build libuv
.
Thanks buddy.
Didn't test yet, but was looking at the nodejs code last day and it seems possible to do it. Would be awesome :)
I am trying to choose what to use between futures.ThreadPoolExecutor or pyyv.ThreadPool. Especially since with pyuv I don't have to manage another dependency for Python 2.7. I saw there was a lot of improvements in latest libuv & pyuv code about ThreadPool, but since I am condamned to use only stable release (hopefully 0.10 will be out soon) what is the best to use right now?
TTY now take the fd parameter in init but this isn't documented.
Is there a way to stop reading and resume later using a tcp handler?
I get these messages while trying to build 0.9.5: https://gist.github.com/schlamar/18a1cd7b93fbae4bae04 Similar errors are on 0.9.4.
Sorry for German messages, I can help translating if you need to.
In which case should we use one or the other?
Is there a way to handle ipv6 and unix socket? Sound like libuv is abble to handle that but i'm not sure it's possible currently with pyuv?
download next two files
git://gist.github.com/4043607.git
git://gist.github.com/4043603.git
run python_d test.py
libuv, pyuv, python are debug version
Hi there,
This is just a wish: it would be great to have pyuv working on Pypy. There is no problem compiling and installing it with Pypy, but some unit tests fail:
test_fsevent_dir (__main__.FSEventTest) ... ok
test_fsevent_nrefile (__main__.FSEventTest) ... ok
test_fsevent_basic (__main__.FSEventTestBasic) ... ok
test_fspoll1 (__main__.FSPollTest) ... RPython traceback:
File "pypy_interpreter_gateway.c", line 842, in BuiltinCodePassThroughArguments1_funcrun_obj
File "pypy_module_cpyext_api_4.c", line 40772, in generic_cpy_call__StdObjSpaceConst_funcPtr_SomeI
File "pypy_module_cpyext_pyobject.c", line 568, in make_ref
File "pypy_module_cpyext_pyobject.c", line 1486, in create_ref
Fatal RPython error: AssertionError
Aborted (core dumped)
test_client1 (__main__.TCPErrorTest) ... ok
test_client2 (__main__.TCPErrorTest) ... ok
test_open (__main__.TCPErrorTest) ... ok
test_tcp_flags (__main__.TCPFlagsTest) ... ok
test_tcp_shutdown (__main__.TCPShutdownTest) ... ok
test_tcp1 (__main__.TCPTest) ... ok
test_tcp_write_cancel (__main__.TCPTest2) ... ok
test_tcp_list (__main__.TCPTestList) ... ok
test_tcp_list_null (__main__.TCPTestListNull) ... ok
test_tcp_list_unicode (__main__.TCPTestListUnicode) ... RPython traceback:
File "pypy_interpreter_gateway.c", line 842, in BuiltinCodePassThroughArguments1_funcrun_obj
File "pypy_module_cpyext_api_4.c", line 40772, in generic_cpy_call__StdObjSpaceConst_funcPtr_SomeI
File "pypy_module_cpyext_pyobject.c", line 568, in make_ref
File "pypy_module_cpyext_pyobject.c", line 1486, in create_ref
Fatal RPython error: AssertionError
Aborted (core dumped)
test_udp_pingpong (__main__.UDPTest) ... RPython traceback:
File "pypy_interpreter_gateway.c", line 842, in BuiltinCodePassThroughArguments1_funcrun_obj
File "pypy_module_cpyext_api_4.c", line 40772, in generic_cpy_call__StdObjSpaceConst_funcPtr_SomeI
File "pypy_module_cpyext_pyobject.c", line 568, in make_ref
File "pypy_module_cpyext_pyobject.c", line 1486, in create_ref
Fatal RPython error: AssertionError
Aborted (core dumped)
Thanks in advance
Alvaro
add following code to pyuv.c, under "#include "pyuv.h"
//Must define Py_TYPE for Python 2.5 or older
//Must define PyVarObject_HEAD_INIT for Python 2.5 or older
PyObject_HEAD_INIT(type) size,
//Must define PyModule_AddIntMacro for Python 2.5 or older
//Must define PyBytes_FromStringAndSize for Python 2.5 or older
//Must define PyBytes_FromString for Python 2.5 or older
will make it support python25 or older
It's prefer to defer the handle's connection with loop to closed callback
When calling a method in a class using the Idle object, the event is never triggered:
>>> loop = pyuv.Loop.default_loop()
>>> class test(object):
... def __init__(self, loop):
... self.loop = loop
... def publish(self):
... idle = pyuv.Idle(self.loop)
... idle.start(self._send)
... def _send(self, h):
... print("test")
... h.stop()
... h.close()
...
>>> t = test(loop)
>>> t.publish()
>>> loop.run()
The signature says send(data[, callback]), but the code actually takes send(address_tuple, data[, callback]).
While trying to evaluate tornado and pyuv, I noticed that pyuv's write() and writelines() methods accept unicode strings as input. This is mildly acceptable in Python 2 (even if, IMO, bad practice), but it is not in Python 3 where bytes and str types are entirely distinct and non-implicitly convertible. In both cases I think it is better to refuse unicode input, since which charset to use is really a function of the higher-level protocol, and therefore should be decided by the user, not the event library.
(e.g. Twisted, AFAIR, will refuse unicode input)
The following code will abort pyuv by triggering the assertion:
src/unix/core.c:651: uv__io_stop: Assertion
loop->watchers[w->fd] == w' failed.`.
According to the libuv docs it is safe to close an FD after you stop() the poll handle. But even if it isn't safe, I think pyuv should not abort the program. In case of a programming error, it should raise an exception.
import os
import pyuv
def on_write(handle, events, errno):
pass
loop = pyuv.Loop.default_loop()
r1, w1 = os.pipe()
poll1 = pyuv.Poll(loop, w1)
poll1.start(pyuv.UV_WRITABLE, on_write)
loop.run_once() # -> pipe is writable
poll1.stop()
os.close(r1); os.close(w1)
# libuv docs tell it's safe to close the FD after stop()
r2, w2 = os.pipe()
assert w1 == w2, 'Try again'
poll2 = pyuv.Poll(loop, w2)
poll2.start(pyuv.UV_WRITABLE, on_write)
loop.run_once()
poll1.close() # -> crash
poll2.close()
The docs on readthedocs are still on 0.7.2 .
I'm getting the error:
fatal error C1900: Inkompatibilität zwischen "P1", Version "20081201", und "P2",
Version "20080116"
LINK : fatal error LNK1257: Fehler bei Codegenerierung.
Sorry for the German messages (again), but the error message should be clear. I'm sure that libuv gets built with VS 2010 while pyuv uses VS 2008 (for Python 2.7), causing this incompatibility.
Uninstalling VS 2010 is a workaround for this issue.
Looking at the code it seems that we now start to handle a signal by passing (callback, signum) . Does it mean we can start as many signum handle we want for a Signal instance ? eg.
s = pyuv.Signal(loop)
s.start(handle_quit, signal.SIGQUIT)
s.start(handle_quit, signal.SIGINT)
This is with the latest pyuv from github, and Python 3.3 (64-bit) on Windows 7.
>python setup.py build_ext --inplace
running build_ext
libuv needs to be compiled.
Building libuv...
Traceback (most recent call last):
File "setup.py", line 38, in <module>
('LIBUV_REVISION', libuv_build_ext.libuv_revision)]
File "C:\Apps\Python33\Lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Apps\Python33\Lib\distutils\dist.py", line 917, in run_commands
self.run_command(cmd)
File "C:\Apps\Python33\Lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Apps\Python33\Lib\distutils\command\build_ext.py", line 347, in run
self.build_extensions()
File "C:\Work\Projects\pyuv\setup_libuv.py", line 79, in build_extensions
self.get_libuv()
File "C:\Work\Projects\pyuv\setup_libuv.py", line 137, in get_libuv
build_libuv()
File "C:\Work\Projects\pyuv\setup_libuv.py", line 119, in build_libuv
exec_process('cmd.exe /C vcbuild.bat release', cwd=self.libuv_dir, env=env, shell=True)
File "C:\Work\Projects\pyuv\setup_libuv.py", line 45, in exec_process
raise DistutilsError('Got return value %d while executing "%s", stderr output was:\n%s' % (returncode, " ".join(cmdline), stderr.rstrip("\n")))
TypeError: Type str doesn't support the buffer API
I get the same error with "pip install pyuv"...
What happen if I create multiple poller with different modes for a fd?
ie: 1 for read and write, then read, then write ? Do the loop safely handle it?
There is a problem with the module declaration of util:
>>> from pyuv import util
>>> util.hrtime()
192352689419120
>>> from pyuv.util import hrtime
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named util
It seems that active_handlers only return the number of active handlers at a a time but not return the real number of pending tasks. For example I can have one pending ticker not showing as active; should I reference all the loop tasks unsing ref() ?
1.tcp.write()
2.tcp's refcount reach 0 then tp_dealloc be called
3.on_stream_write be called,
Py_INCREF(self) refcount 1
Py_DECREF(self) refcount 0 so handle_tp_dealloc be called second time
Is this a problem?
uv_close also have this problem
The test test_async.py
triggers the following exception on 64-bit Fedora:
python: src/unix/core.c:70: uv_close: Assertion `!(handle->flags & (UV_CLOSING | UV_CLOSED))' failed.
libuv supports a number of cross platform low level threading synchronization primitives such as semaphores,mutextes and conditions. A quick non-scientific test shows that a wrapper around uv_sem_t is about 4 times faster than the CPython Semaphone implementation.
Not sure if I should add that to pyuv, but here are the experiments: https://github.com/saghul/pyuv/tree/thread_module
It would be interesting to create a TCP or UDP objects from a python socket object or a file descriptor.
pipe.c:
r = uv_write2(wr, (uv_stream_t *)UV_HANDLE(self), bufs, buf_count, (uv_stream_t *)UV_HANDLE(send_handle), on_stream_write); if (r != 0) { RAISE_UV_EXCEPTION(UV_HANDLE_LOOP(self), PyExc_PipeError); goto error; }
What does RAISE_UV_EXCEPTION
? If it raises a real exception, how would be the next goto error
be executed? "raise" is supposed to do longjmp
, sure:
Maybe you have a "PyUV" exception handler that "absorbs" the exception, releases the loop and raise the stored exception?
Crashes are found when running the following modules/functions on Windows 7 (32 bits) with MinGW:
The error message reads as follows:
$ gdb python
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from c:\Python27\python.exe...(no debugging symbols found)...done.
(gdb) run DISABLEDtest_dns.py
Starting program: c:\Python27\python.exe DISABLEDtest_dns.py
[New Thread 2700.0xcec]
test_getaddrinfo (__main__.DNSTest) ... [New Thread 2700.0xac0]
warning: HEAP[python.exe]:
warning: Invalid address specified to RtlFreeHeap( 00390000, 00302B90 )
Program received signal SIGTRAP, Trace/breakpoint trap.
0x770c4685 in ntdll!RtlpSetUserPreferredUILanguages ()
from C:\Windows\system32\ntdll.dll
(gdb)
These crashes don't manifest on Windows XP, sigh.
Windows 7. New pyd built from latest:
The following code:
import pyuv
loop = pyuv.Loop.default_loop()
print "1"
dns = pyuv.dns.DNSResolver(loop)
print "2"
Results in:
1
And then the application exits.
When a handle's reference count goes to zero, the handle is removed from the loop (this is done in Handle_tp_dealloc()
). This is quite a pain, as you need to ensure that you always keep a reference to your handles. A few times I wanted to use the following idiom to schedule a run-once callback. The code below prints nothing, unless you uncomment the "global" statement in schedule_callback, in which case it prints "callback!".
import pyuv
loop = pyuv.Loop.default_loop()
def callback(handle):
print('callback!')
handle.close()
def schedule_callback(callback):
#global prep # uncomment
prep = pyuv.Prepare(loop)
prep.start(callback)
schedule_callback(callback)
loop.run()
You could argue this is a bug in the code. However I think it's not programmer friendly to require the programmer to keep a reference to a handle:
schedule_callback()
function above and move its body to the module-level, it would have worked.I think it would be better if a reference is taken to the handle when start()
is called, which is release when the handle is closed. This prevents this common error, and is e.g. also what gevent does.
Had hard time to figure that the errno in stream was different from the python one. ie 1 in this case mean EOF. (python say errno.EPERM) . Maybe returning "" instead would be more pythonic ? Anyway would worth to mention it in the doc :)
It should be possible to subclass the classes defined by pyuv. This is currently not possible, because the Py_TPFLAGS_BASETYPE
flag is not provided in the tp_flags
element of the type definition structures.
If you write a memoryview to a socket, you will get a MemoryError raised.
In this case, string = memoryview("blah")
Traceback (most recent call last):
File "..\socket_pyuv_write_memoryview.py", line 31, in
incoming_socket.write(string, write_callback)
MemoryError
Now that these methods support the open method, there should also be a way to expose the file descriptor, so we can pass it to other functions.
I just got a segfault while testing:
$ nosetests -w tests/
....................S.....................E..............EE............FE.......
.E....SSSS......SS...Segmentation fault
Platform: Windows 7 64bit, Python 2.7 32bit.
Sadly not reproducible.
Is there the possibility to start a child process without launching a console? Here are some examples how you can achieve this with subprocess
: http://stackoverflow.com/questions/1813872/running-a-process-in-pythonw-with-popen-without-a-console
Sometimes it can be useful to clear all jobs in the threadpool. It would be cool to have a .stop() or .delete_works() method to do that.
libuv supports a number of cross platform low level threading synchronization primitives such as semaphores,mutextes and conditions. A quick non-scientific test shows that a wrapper around uv_sem_t is about 4 times faster than the CPython Semaphone implementation.
Not sure if I should add that to pyuv, but here are the experiments: https://github.com/saghul/pyuv/tree/thread_module
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.