Displaying 7 results from an estimated 7 matches for "py_get_ready".
2020 Sep 01
0
[nbdkit PATCH 1/2] python: Implement .list_exports and friends
...xport-name.sh \
+ test-python-export-list.sh \
test-python-plugin.py \
test-python-thread-model.sh \
test-python.sh \
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 27c5ede2..498ffebc 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -536,6 +536,99 @@ py_get_ready (void)
return 0;
}
+static int
+py_list_exports (int readonly, int is_tls, struct nbdkit_exports *exports)
+{
+ ACQUIRE_PYTHON_GIL_FOR_CURRENT_SCOPE;
+ PyObject *fn;
+ PyObject *r;
+ PyObject *iter, *t;
+
+ if (!callback_defined ("list_exports", &fn))
+ /* Do the same as...
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.
2020 Sep 01
4
[nbdkit PATCH 0/2] More language bindings for .list_exports
This picks up python and ocaml. Some of our languages are lacking a
number of bindings (for example, lua and perl lack .extents, so I
didn't have anything to copy from), and I felt less comfortable with
golang and rust. But for python and ocaml, I was able to test a
working implementation.
Eric Blake (2):
python: Implement .list_exports and friends
ocaml: Implement .list_exports and
2020 Aug 05
5
[PATCH NOT WORKING nbdkit 0/3] python: Allow thread model to be set from Python plugins.
Patch 2 certainly allows you to set the thread model. However patch 3
shows that if you set it to nbdkit.THREAD_MODEL_PARALLEL it will
crash.
If you look closely at the stack trace (attached below) you can see
that ignoring threads which are in parts of nbdkit unrelated to
Python:
Thread 4: In pread, waiting in time.sleep(). This thread has released
the GIL.
Thread 2: Started to
2020 Feb 25
6
[PATCH nbdkit 0/5] server: Add .get_ready callback.
I like this change. I think we were overloading the config_complete
method before to do two different things (complete configuration; do
any allocation/housekeeping necessary before we can start serving).
The only questions in my mind are whether we want this before 1.18,
and whether the name ("get_ready") is a good one.
Rich.
2020 Mar 19
5
[nbdkit PATCH 0/2] More caching of initial setup
When I added .can_FOO caching in 1.16, I missed the case that the sh
plugin itself was calling .can_flush twice in some situations (in
order to default .can_fua). Then right after, I regressed it to call
.can_zero twice (in order to default .can_fast_zero). I also missed
that .thread_model could use better caching, because at the time, I
did not add testsuite coverage. Fix that now.
Eric Blake
2020 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by
improving libnbd to better test things, which in turn surfaced some
major memory leak problems in nbdsh that are now fixed). Many of the
patches are minor rebases from v2, with the biggest changes being
fallout from:
- patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export
- overall: this missed 1.22, so update