summaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
authorsueloverso <sue@mongodb.com>2017-01-16 20:20:43 -0500
committerAlex Gorrod <alexander.gorrod@mongodb.com>2017-01-17 12:20:43 +1100
commit4da006a05bf3e01ebbfcfd7d55ee67e84413f44a (patch)
treec65d021cba1458aa33a3e437d19a53b289d507cd /src/support
parent67f96585500a67236e6df2d633acf64dfe16fe5f (diff)
downloadmongo-4da006a05bf3e01ebbfcfd7d55ee67e84413f44a.tar.gz
WT-3105 Avoid thread group deadlock on close in new dynamic eviction code. (#3242)
Diffstat (limited to 'src/support')
-rw-r--r--src/support/thread_group.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/support/thread_group.c b/src/support/thread_group.c
index d04f8977a9a..beb143e63e2 100644
--- a/src/support/thread_group.c
+++ b/src/support/thread_group.c
@@ -325,8 +325,8 @@ __wt_thread_group_start_one(
if (wait)
__wt_writelock(session, &group->lock);
- else if (__wt_try_writelock(session, &group->lock) != 0)
- return (0);
+ else
+ WT_RET(__wt_try_writelock(session, &group->lock));
/* Recheck the bounds now that we hold the lock */
if (group->current_threads < group->max)
@@ -352,8 +352,8 @@ __wt_thread_group_stop_one(
if (wait)
__wt_writelock(session, &group->lock);
- else if (__wt_try_writelock(session, &group->lock) != 0)
- return (0);
+ else
+ WT_RET(__wt_try_writelock(session, &group->lock));
/* Recheck the bounds now that we hold the lock */
if (group->current_threads > group->min)