Displaying 3 results from an estimated 3 matches for "seterrorfun".
2015 Jun 11
2
Re: [PATCH 3/5] threads: Use thread-local storage for errors.
...> error handler). I haven't yet worked out a better way to solve this.
Do you have a feeling whether the error handler function push/pop
is a commonly used feature or not ?
In libvirt we originally had
virGetLastError (global error)
virConnGetLastError (per connection error)
virSetErrorFunc (global error handler func)
When we introduced thread support we didn't try to make the
virConnGetLastError/SetErrorFun work. We just updated the docs
to tell applications to /never/ use them in threaded applications,
and always use the virGetLastError which was thread-local
backed. For b...
2015 Jun 11
0
Re: [PATCH 3/5] threads: Use thread-local storage for errors.
...in our code:
$ git grep -E 'guestfs_(push|pop)_error_handler' -- *.c | wc -l
83
Of course we could change those, but it is still an API guarantee.
> In libvirt we originally had
>
> virGetLastError (global error)
> virConnGetLastError (per connection error)
> virSetErrorFunc (global error handler func)
>
> When we introduced thread support we didn't try to make the
> virConnGetLastError/SetErrorFun work. We just updated the docs
> to tell applications to /never/ use them in threaded applications,
> and always use the virGetLastError which was t...
2015 Jun 06
7
[PATCH 0/5] Add support for thread-safe handle.
This patch isn't ready to go upstream. In fact, I think we might do a
quick 1.30 release soon, and save this patch, and also the extensive
changes proposed for the test suite[1], to after 1.30.
Currently it is not safe to use the same handle from multiple threads,
unless you implement your own mutexes. See:
http://libguestfs.org/guestfs.3.html#multiple-handles-and-multiple-threads
These