Home GnuPG
Diffusion GPGME 9e7df9aa6d81

w32: Change the way the I/O threads are cleaned up.
9e7df9aa6d81Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

w32: Change the way the I/O threads are cleaned up.

* src/w32-io.c (reader_context_s, create_reader)
(writer_context_s, create_writer): Rename STOPPED to CLOSE_EV.
(reader, writer): Remove setting of STOPPED.  Wait for CLOSE_EV and
then release the context.
(destroy_reader, destroy_writer): Do not wait but set the CLOSE_EV.
(kill_reader, kill_writer): Remove.
(_gpgme_io_close): Add code from kill_reader and kill_writer.

The old code was prone to deadlocks which were actually exhibited at
Kleopatra startup. The new code is much more straightforward and
easier to understand. The reason for the complex old code was
probably due to our former idea to allow re-use of the I/O threads.
However we have long given up on this.

Details

Provenance
wernerAuthored on Apr 25 2013, 1:00 PM
Parents
rM9f330be8210d: Fix hang in socket closing.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rM9e7df9aa6d81: w32: Change the way the I/O threads are cleaned up. (authored by Werner Koch <wk@gnupg.org>).May 11 2013, 3:38 PM