Fix: consumer metadata switch timer error handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 25 Apr 2013 18:45:17 +0000 (14:45 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 26 Apr 2013 15:26:30 +0000 (11:26 -0400)
commit4419b4fb187cb896a8e64bb97c5471240abca122
tree5c29c9f55b82833b351ff6decad0692c0c7b690e
parentd4298c99f2fc4864cdabb3a90fed4d1117308a51
Fix: consumer metadata switch timer error handling

The thread handling the metadata switch cannot call
consumer_timer_switch_stop(), because it would become stucked waiting
for itself to execute the teardown signal handler.

Moreover, only one thread is allowed to call start/stop timer (by
design). Therefore, it's a race to have the thread handling the timer
handler calling "stop".

Fix this by adding a "switch_timer_error" flag, which just inhibits the
timer if an error is encountered, but does not modify its state
otherwise.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/consumer-timer.c
src/common/consumer.h
This page took 0.027116 seconds and 4 git commands to generate.