Commit Graph

36 Commits

Author SHA1 Message Date
Caolán McNamara
7f476fea47 boost::unordered_map -> c++11 std::unordered_map
Change-Id: I28438000c2b0a8e6ce4f5640f861f572c0cb83c8
2014-12-27 23:00:45 +00:00
Stephan Bergmann
b021fdfab3 cid#983623 Don't throw DisposedException past uno_threadpool_putJob
This improves on b68640c44e "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-11-14 16:19:40 +01:00
Noel Grandin
9685276b97 cppu and cppuhelper: loplugin: cstylecast
Add a macro in include/cppuhelper/implbase_ex.hxx
to make initialising the type_entry classes a little less verbose.

Change-Id: I0904b5b9db269c92bc89e7ce3d6c8b09350c9897
2014-09-17 07:08:23 +02:00
Thomas Arnhold
2d4590ae56 oox: drop using from header
Change-Id: Ie353c561ccdcfb3c198ff05943f0ea64a3626735
2014-05-19 20:04:23 +02:00
Alexander Wilms
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
Stephan Bergmann
34a44156b3 cppu: sal_Bool -> bool
Change-Id: I1288f1f6f38d1475b4eb5272509e479bd9f2552d
2014-02-17 17:55:18 +01:00
Michael Meeks
c3a6a57fc2 re-base on ALv2 code. 2012-06-13 14:18:29 +01:00
Stephan Bergmann
2fa2660b55 Better fix for ThreadPool/ORequestThread life cycle
This is a follow up to d015384e1d "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-23 10:10:51 +02:00
Stephan Bergmann
d015384e1d Fixed ThreadPool (and dependent ORequestThread) life cycle
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
2012-05-16 22:09:21 +02:00
Stephan Bergmann
7c704c78d3 Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC)
is used to annotate legitimately unused parameters, so that static
analysis tools can tell legitimately unused parameters from truly
unnecessary ones.  To that end, some patches for external modules
are also added, that are only applied when compiling with GCC and
add necessary __attribute__ ((unused)) in headers.
2012-01-21 15:21:16 +01:00
Stephan Bergmann
2af1a97346 Removed superfluous CPPU_DLLPUBLIC from definitions. 2011-12-19 11:33:13 +01:00
Matúš Kukan
d899f976ee cppu: add visibility symbols 2011-12-19 10:14:52 +01:00
Norbert Thiebaud
24b4c075d5 remove include of pch header in cppu 2011-11-27 13:02:56 -06:00
Tor Lillqvist
b6e36a7fa9 Use explicitly cast zeros to avoid compilation error with MSVC2010
Could also use nullptr, is it supported by all compiler versions we use?
2011-03-14 12:20:35 +02:00
Fridrich Strba
4724f82bf2 move module cppu to boost unordered containers 2011-02-03 23:39:38 +01:00
Sebastian Spaeth
a715e1b3d0 Add vim/emacs modelines to all source files
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-14 17:04:31 +02:00
Caolán McNamara
521a9f6f76 #i107490# cppu lifecycle cleanup 2010-10-11 12:37:08 +01:00
Jens-Heiner Rechtien
7c80db2eb3 changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) 2010-02-12 15:01:35 +01:00
Rüdiger Timm
dc1214ce9c INTEGRATION: CWS changefileheader (1.17.34); FILE MERGED
2008/03/31 07:23:20 rt 1.17.34.1: #i87441# Change license header to LPGL v3.
2008-04-11 09:34:54 +00:00
Oliver Bolte
5a8c9b573f INTEGRATION: CWS unomacli64 (1.16.36); FILE MERGED
2007/06/07 10:54:33 kr 1.16.36.2: fixed: #i77600# warning because of wrong format specifier - now uses C++ style casts
2007/06/07 09:22:29 kr 1.16.36.1: fixed: #i77600# warning because of wrong format specifier
2007-07-18 11:22:02 +00:00
Oliver Bolte
d73c8e12f7 INTEGRATION: CWS pchfix02 (1.15.10); FILE MERGED
2006/09/01 17:23:01 kaib 1.15.10.1: #i68856# Added header markers and pch files
2006-09-16 23:20:10 +00:00
Jens-Heiner Rechtien
4027faeae0 INTEGRATION: CWS warnings01 (1.11.32); FILE MERGED
2005/09/22 20:43:40 sb 1.11.32.4: RESYNC: (1.11-1.12); FILE MERGED
2005/09/06 10:11:51 sb 1.11.32.3: #i53898# sal::reinterpret_int_cast is not needed.
2005/08/31 13:43:20 sb 1.11.32.2: #i53898# Made code warning-free.
2005/08/29 14:03:50 sb 1.11.32.1: #i53898# Made code warning-free.
2006-06-19 12:12:45 +00:00
Kurt Zenker
caf3637b53 INTEGRATION: CWS jsc9 (1.13.2); FILE MERGED
2006/04/26 14:15:33 jsc 1.13.2.1: #134738# move fixes back to previous version
2006-04-26 19:50:31 +00:00
Jens-Heiner Rechtien
55fda0f7da INTEGRATION: CWS sb49 (1.12.38); FILE MERGED
2006/03/22 10:14:06 sb 1.12.38.1: #i63397# Keep objects alive long enough so that threads still running while atexit handlers are processed do not access dead objects.
2006-04-19 12:49:32 +00:00
Rüdiger Timm
d2c8d54a8c INTEGRATION: CWS ooo19126 (1.11.36); FILE MERGED
2005/09/05 13:54:28 rt 1.11.36.1: #i54170# Change license header: remove SISSL
2005-09-08 07:48:10 +00:00
Rüdiger Timm
eac7a50024 INTEGRATION: CWS ooo64bit01 (1.9.72); FILE MERGED
2004/05/01 22:26:31 svesik 1.9.72.2: RESYNC: (1.9-1.10); FILE MERGED
2004/03/16 23:54:05 fa 1.9.72.1: Merge cws_srx644_port64bit, other misc fixes
2004-06-17 11:45:43 +00:00
Sander Vesik
4f6d1a1dcf INTEGRATION: CWS ooo20040329 (1.9.70); FILE MERGED
2004/03/17 11:39:43 waratah 1.9.70.1: #i1858# remove unused variable from code
2004-04-21 11:57:23 +00:00
Vladimir Glazounov
61e1bc2eac INTEGRATION: CWS dbgmacros1 (1.8.58); FILE MERGED
2003/04/09 10:38:51 kso 1.8.58.1: #108413# - debug macro unification.
2003-04-15 15:37:01 +00:00
Jörg Budischewski
d73573f563 #87516# possible 2 second timeout for a remote call removed 2001-05-28 14:56:16 +00:00
Jörg Budischewski
5ab2b3c757 made the threadpool handle administrator secure against duplicate handles 2001-05-10 10:59:37 +00:00
Jörg Budischewski
cb137b6a14 incompatible change of the uno threadpool 2001-05-08 14:55:56 +00:00
Daniel Boelzle
d17143e649 no use of SAL_DLLEXPORT anymore, using def file 2001-03-28 09:50:37 +00:00
Daniel Boelzle
fee2a34fc7 revised function throw () clauses 2001-03-09 11:10:57 +00:00
Jörg Budischewski
11625a33ab #83737# fill the udk208 branch into the main stream 2001-02-20 13:44:41 +00:00
Daniel Boelzle
61193f586b empty throw () clauses 2000-12-21 13:39:29 +00:00
Jens-Heiner Rechtien
b525a3115f initial import 2000-09-18 14:29:57 +00:00