r17612 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17611‎ | r17612 | r17613 >
Date:12:16, 13 November 2006
Author:river
Status:old
Tags:
Comment:
event_init is not thread safe; have make_event_base() hold a lock while initialising itself
Modified paths:
  • /trunk/willow/src/willow/wnet.cc (modified) (history)

Diff [purge]

Index: trunk/willow/src/willow/wnet.cc
@@ -548,7 +548,9 @@
549549 void
550550 make_event_base(void)
551551 {
 552+static lockable meb_lock;
552553 if (evb == NULL) {
 554+ HOLDING(meb_lock);
553555 evb = (event_base *)event_init();
554556 event_base_priority_init(evb, prio_max);
555557 signal_set(&ev_sigint, SIGINT, sig_exit, NULL);