]> git.pond.sub.org Git - empserver/commit
Synchronize commands and update properly with a lock (towards
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 15 Jan 2007 19:57:26 +0000 (19:57 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 15 Jan 2007 19:57:26 +0000 (19:57 +0000)
commit6cbdd3e02a4126653523426051738414763c5de6
tree89fbcea32b17ab65fa9f2cd8c2799772cf268cba
parent0c52f203c09f5deef548c1b2811cbaf28fac981e
Synchronize commands and update properly with a lock (towards
resolving #1458175 and #1504036):
(update_lock): New.
(update_shed): Initialize it.
(update_wait, dispatch): Take exclusive update_lock around the update,
shared update_lock around commands.  This makes the update block until
all aborted commands terminated and gave up their lock.  Remove the
cheesy and unsafe two second wait for commands to finish.  It also
makes player threads block before executing commands while the update
is pending, removing the need to fail commands then.  So don't.
include/server.h
src/lib/player/dispatch.c
src/server/update.c