From: bangerth Date: Thu, 12 Dec 2013 17:34:45 +0000 (+0000) Subject: Add a comment. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db497b7f0eaa3f93ff59c3519183c1e10a0e5198;p=dealii-svn.git Add a comment. git-svn-id: https://svn.dealii.org/trunk@31983 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/work_stream.h b/deal.II/include/deal.II/base/work_stream.h index 363c28bbc7..63007aba91 100644 --- a/deal.II/include/deal.II/base/work_stream.h +++ b/deal.II/include/deal.II/base/work_stream.h @@ -348,6 +348,15 @@ namespace WorkStream // and have set the ring buffer to have exactly this size. so // if this function is called, we know that less than the // maximal number of items in currently in flight + // + // note that we need not lock access to this array since + // the current stage is run sequentially and we can therefore + // enter the following block only once at any given time. + // thus, there can be no race condition between checking that + // a flag is false and setting it to true. (there may be + // another thread where we release items and set 'false' + // flags to 'true', but that too does not produce any + // problems) ItemType *current_item = 0; for (unsigned int i=0; i