Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57861 - trunk/libs/thread/doc
From: anthony_at_[hidden]
Date: 2009-11-23 06:24:54


Author: anthonyw
Date: 2009-11-23 06:24:53 EST (Mon, 23 Nov 2009)
New Revision: 57861
URL: http://svn.boost.org/trac/boost/changeset/57861

Log:
Added a note highlighting that recursive use of call_once will cause deadlock.

Text files modified:
   trunk/libs/thread/doc/once.qbk | 3 +++
   1 files changed, 3 insertions(+), 0 deletions(-)

Modified: trunk/libs/thread/doc/once.qbk
==============================================================================
--- trunk/libs/thread/doc/once.qbk (original)
+++ trunk/libs/thread/doc/once.qbk 2009-11-23 06:24:53 EST (Mon, 23 Nov 2009)
@@ -45,6 +45,9 @@
 
 [[Throws:] [`thread_resource_error` when the effects cannot be achieved. or any exception propagated from `func`.]]
 
+[[Note:] [If the function passed to `call_once` also calls `call_once`
+passing the same `once_flag` object then deadlock will occur.]]
+
 ]
 
     void call_once(void (*func)(),once_flag& flag);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk