[Commits] [wesnoth/wesnoth] 6eaa68: fixup unit tests for sdl 2.0
GitHub
noreply at github.com
Thu May 8 06:03:47 UTC 2014
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 6eaa687d1aa4cffabe083559df8cedb8e2c1ec7e
https://github.com/wesnoth/wesnoth/commit/6eaa687d1aa4cffabe083559df8cedb8e2c1ec7e
Author: Chris Beck <render787 at gmail.com>
Date: 2014-05-08 (Thu, 08 May 2014)
Changed paths:
M src/game.cpp
Log Message:
-----------
fixup unit tests for sdl 2.0
The idea here is to make it safe to detach the worker thread. We
replace the scoped pointer for the game_controller with a shared
pointer, and pass this to the worker thread. This way the worker
won't segfault if main thread times out and decides to return.
In SDL 2.0.2, Detach thread becomes available. I haven't tested
on the new version of SDL, but my understanding from posix
is that detached threads will simply run separately, until the
time that the main thread returns, at which point they will
be terminated.
I added compiler checks so that if Detach thread is not available,
the compiler will simply disable unit test timeouts, but otherwise
keep unit tests available.
More information about the Commits
mailing list