[PATCH] tevent: First stab at a glib backend
cat at vv.carleton.ca
Mon Jan 2 16:47:54 MST 2012
Here is a glib backend for tevent. This backend lets single-threaded
GTK apps embed parts of Samba which use tevent for I/O. These apps
will also be able to make async calls into, say, smbclient-raw. In
particular, this is the first step towards a Samba 4 backend for GVFS.
fds and timers are mapped to the corresponding glib GSources, and the
main loop is implemented using GMainContext. The dependency of tevent
on glib is optional and auto-detected at configure time. The tevent
ABI change was necessary to expose tevent_common_timed_destructor, and
should not break anything.
I have tested this using the test suite (waf test
--tests=samba4.local.event), and the backend passes with comparable
numbers of pipe events/sec as other backends (172492.00 ev/s for glib
vs 178985.50 ev/s for poll).
I have also tried forcing smbclient to use this backend
(source4/lib/events/tevent_s4.c) and I was able to open a session to a
share as guest (XP SP3 64-bit server), list the current directory, and
download a file.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 24833 bytes
Desc: not available
More information about the samba-technical