summaryrefslogtreecommitdiff
path: root/cppu/source/threadpool/threadpool.hxx
AgeCommit message (Collapse)Author
2017-11-18Replace lists by vector or deque (cppu)Julien Nabet
+ use for range loops Change-Id: If0fcba6e06538913031c50ec878b18db3547e06c Reviewed-on: https://gerrit.libreoffice.org/44894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-15Drop :: prefix from std in c*/Tor Lillqvist
Change-Id: If078cda95fa6ccd37270a5e9d81cfa0b84e71155 Reviewed-on: https://gerrit.libreoffice.org/34324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-01::std::list < sal_Int64 > -> std::vectorNoel Grandin
Change-Id: Ia3c3b8dd1fc3c5865ad0642cfa93430b95fae9d2
2015-09-14boost->stdCaolán McNamara
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c Reviewed-on: https://gerrit.libreoffice.org/18564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-18Some oslCondition -> osl::ConditionStephan Bergmann
Change-Id: I86cfbefd1cb8b22fca659a158b8e31d5c991de7a
2015-01-20Some more loplugin:cstylecast: cppuStephan Bergmann
Change-Id: Iec1251648031afa9eddd7445135fb08dc74821bd
2014-12-27boost::unordered_map -> c++11 std::unordered_mapCaolán McNamara
Change-Id: I28438000c2b0a8e6ce4f5640f861f572c0cb83c8
2014-11-14cid#983623 Don't throw DisposedException past uno_threadpool_putJobStephan Bergmann
This improves on b68640c44ecdb1df59d704cc6c2bae8bb412d7d0 "Prevent creation of new ORequestThreads during shutdown," which added throwing the DisposedException from ThreadAdmin::add. But ThreadAdmin::m_disposed can only become true via uno_threadpool_destroy -> ThreadPool::joinWorkers -> ThreadAdmin::join, and ThreadAdmin::add observing that can only happen via uno_threadpool_putJob -> ThreadPool::addJob -> ThreadPool::createThread -> ORequestThread::launch -> ThradAdmin::add, where the bridges should ensure that uno_threadpool_destroy does not run in parallel with uno_threadpool_putJob. So demote this from a DisposedException to a SAL_WARN. Change-Id: I3912ea077b7fa35827c41e82dd0a8f962ba412b6
2014-05-19oox: drop using from headerThomas Arnhold
Change-Id: Ie353c561ccdcfb3c198ff05943f0ea64a3626735
2014-04-01Explicitly mark overriding destructors as "virtual"Stephan Bergmann
It appears that the C++ standard allows overriding destructors to be marked "override," but at least some MSVC versions complain about it, so at least make sure such destructors are explicitly marked "virtual." Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-02-17cppu: sal_Bool -> boolStephan Bergmann
Change-Id: I1288f1f6f38d1475b4eb5272509e479bd9f2552d
2014-01-27bool improvementsStephan Bergmann
Change-Id: I757e19313576d2c3d13af1cb720f182f0de91613
2012-06-13re-base on ALv2 code.Michael Meeks
2012-05-23Better fix for ThreadPool/ORequestThread life cycleStephan Bergmann
This is a follow up to d015384e1d98fe77fd59339044f58efb1ab9fb25 "Fixed ThreadPool (and dependent ORequestThread) life cycle" that still had some problems: * First, if Bridge::terminate was first entered from the reader or writer thread, it would not join on that thread, so that thread could still be running during exit. That has been addressed by giving Bridge::dispose new semantics: It waits until both Bridge::terminate has completed (even if that was called from a different thread) and all spawned threads (reader, writer, ORequestThread workers) have been joined. (This implies that Bridge::dispose must not be called from such a thread, to avoid deadlock.) * Second, if Bridge::terminate was first entered from an ORequestThread, the call to uno_threadpool_dispose(0) to join on all such worker threads could deadlock. That has been addressed by making the last call to uno_threadpool_destroy wait to join on all worker threads, and by calling uno_threadpool_destroy only from the final Bridge::terminate (from Bridge::dispose), to avoid deadlock. (The special semantics of uno_threadpool_dispose(0) are no longer needed and have been removed, as they conflicted with the fix for the third problem below.) * Third, once uno_threadpool_destroy had called uno_threadpool_dispose(0), the ThreadAdmin singleton had been disposed, so no new remote bridges could successfully be created afterwards. That has been addressed by making ThreadAdmin a member of ThreadPool, and making (only) those uno_ThreadPool handles with overlapping life spans share one ThreadPool instance (which thus is no longer a singleton, either). Additionally, ORequestThread has been made more robust (in the style of salhelper::Thread) to avoid races. Change-Id: I2cbd1b3f9aecc1bf4649e482d2c22b33b471788f
2012-05-16Fixed ThreadPool (and dependent ORequestThread) life cycleStephan Bergmann
At least with sw_complex test under load, it happened that an ORequestThread could still process a remote release request while the main thread was already in exit(3). This was because (a) ThreadPool never joined with the spawned worker threads (which has been rectified by calling uno_threadpool_dispose(0) from the final uno_threadpool_destroy), and (b) binaryurp::Bridge called uno_threadpool_destroy only from its destructor (which could go as late as exit(3)) instead of from terminate. Additional clean up: * Access to Bridge's threadPool_ is now cleanly controlled by mutex_ (even though that might not be necessary in every case). * ThreadPool's stopDisposing got renamed to destroy, to make meaning clearer. Change-Id: I45fa76e80e790a11065e7bf8ac9d92af2e62f262
2011-12-08Less succes, more successStefan Knorr (astron)
2011-02-03move module cppu to boost unordered containersFridrich Strba
2010-10-14Add vim/emacs modelines to all source filesSebastian Spaeth
Fixes #fdo30794 Based on bin/add-modelines script (originally posted in mail 1286706307.1871.1399280959@webmail.messagingengine.com) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-10-11#i107490# cppu lifecycle cleanupCaolán McNamara
2010-02-12changefileheader2: #i109125#: change source file copyright notice from Sun ↵Jens-Heiner Rechtien
Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision)
2008-04-11INTEGRATION: CWS changefileheader (1.5.84); FILE MERGEDRüdiger Timm
2008/03/31 07:23:21 rt 1.5.84.1: #i87441# Change license header to LPGL v3.
2006-06-19INTEGRATION: CWS warnings01 (1.1.1.1.196); FILE MERGEDJens-Heiner Rechtien
2005/09/22 20:43:49 sb 1.1.1.1.196.2: RESYNC: (1.1.1.1-1.2); FILE MERGED 2005/08/31 13:43:20 sb 1.1.1.1.196.1: #i53898# Made code warning-free.
2006-04-26INTEGRATION: CWS jsc9 (1.3.2); FILE MERGEDKurt Zenker
2006/04/26 14:15:33 jsc 1.3.2.1: #134738# move fixes back to previous version
2006-04-19INTEGRATION: CWS sb49 (1.2.38); FILE MERGEDJens-Heiner Rechtien
2006/03/22 10:14:07 sb 1.2.38.1: #i63397# Keep objects alive long enough so that threads still running while atexit handlers are processed do not access dead objects.
2005-09-08INTEGRATION: CWS ooo19126 (1.1.1.1.200); FILE MERGEDRüdiger Timm
2005/09/05 13:54:28 rt 1.1.1.1.200.1: #i54170# Change license header: remove SISSL
2000-09-18initial importJens-Heiner Rechtien