author | Jan Andres <jan.andres@berenberg.de> | |
Wed, 21 Oct 2015 11:50:43 +0000 (13:50 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Sun, 8 Nov 2015 16:12:34 +0000 (17:12 +0100) | ||
commit | b888aac60926d5d31af6a87a2a86ba02da032ad3 | |
tree | 50d54e2f4c9257440a68399a968ee506d1995c57 | tree | snapshot |
parent | cf872835b60a3ec683b428832fbc79d6aa2df939 | commit | diff |
Start write threads after plugin initialization.
Some plugins such as "network" create own threads from within their
init callbacks which can then start submitting data to the queue
right away, even if the read threads haven't been started yet.
If write threads are started before plugin initialization, this can
result in a race where a plugin's write callback gets called before
that plugin's init callback has completed.
To fix this, delay starting the write threads until after all plugins
have been initialized.
Some plugins such as "network" create own threads from within their
init callbacks which can then start submitting data to the queue
right away, even if the read threads haven't been started yet.
If write threads are started before plugin initialization, this can
result in a race where a plugin's write callback gets called before
that plugin's init callback has completed.
To fix this, delay starting the write threads until after all plugins
have been initialized.
src/plugin.c | diff | blob | history |