32 Commits

Author SHA1 Message Date
UbitUmarov
c0a2569b32 in fact there is no thread.abort 2024-04-11 04:29:01 +01:00
UbitUmarov
c981f3c448 avoid a possible null ref 2024-04-11 02:42:05 +01:00
UbitUmarov
ec39f85a7a cosmetics 2023-03-07 14:33:42 +00:00
UbitUmarov
ac8c69ba1a use some c#9 style sugar plus cosmetics 2022-10-03 14:33:20 +01:00
UbitUmarov
ea83284c87 avoid null ref 2022-10-02 23:45:57 +01:00
UbitUmarov
2346af0715 smartThreadPool changes 2022-10-02 12:03:44 +01:00
UbitUmarov
b022ae0898 cosmetics 2021-11-21 02:20:59 +00:00
UbitUmarov
a4bd8a91c5 cosmetics 2021-11-20 01:58:08 +00:00
UbitUmarov
1e4799604f add suspendflow option to workmanager startthread 2021-09-07 02:51:08 +01:00
UbitUmarov
1e1ec44707 smartthreadpool: do not start a thread before register it 2021-09-03 14:54:54 +01:00
UbitUmarov
94d1cf1205 smartthreadpool: replace its locked dictionary 2021-09-03 14:36:57 +01:00
UbitUmarov
d525286b0f smartthreadpool: do informcomleted under locks 2021-01-18 18:18:30 +00:00
UbitUmarov
1db6a541bd more changes to smartthreadpool 2021-01-13 16:23:49 +00:00
UbitUmarov
d72f19111c smartthreadpool: place a global throttle on threads creation if pool as less than min number of threads ( 20/s versus .net 1/s in all cases) 2021-01-02 12:38:25 +00:00
UbitUmarov
4b7502c1dc smartthreadpool: remove workitems priority. Its lack of fairness could cause issues hard to debug if we tried to use it (we don't) (runprebuild) 2020-12-31 14:29:36 +00:00
UbitUmarov
960a0fa360 smartthreadpool: add pool option SuppressFlow and test it on main smart?? pool (may go bad) 2020-12-31 02:46:38 +00:00
UbitUmarov
64fd819b81 still some windows code 2020-12-30 22:07:42 +00:00
UbitUmarov
b667bff8bb smartthreadpool: httpcontext will be gone (we dont use it) 2020-12-30 11:53:46 +00:00
UbitUmarov
4ab792cd13 smartthreadpool: remove old windows(like CE) support, remove tabs.. (do runprebuild) 2020-12-30 11:38:18 +00:00
UbitUmarov
592b94d142 some changes on Dispose 2020-08-09 00:20:50 +01:00
Melanie Thielker
b16abc8166 Massive tab and trailing space cleanup 2017-01-05 19:07:37 +00:00
UbitUmarov
52a80f1742 workaround potencial memory leak 2016-08-22 05:47:19 +01:00
UbitUmarov
222a5b655f workaround potencial memory leak 2016-08-22 04:13:05 +01:00
Roger Kirkman
97a471cb35 Fix crash due to setting Thread.name after thread start.
Signed-off-by: Diva Canto <diva@metaverseink.com>
2016-05-12 17:42:42 -07:00
BlueWall
96a2449122 Undo "Revert "Small changes to threading to send thread names to unmanaged threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects.""
Fix for break in next commit

This reverts commit 376fab1402.
2014-09-17 20:03:54 -04:00
BlueWall
376fab1402 Revert "Small changes to threading to send thread names to unmanaged threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects."
This reverts commit af286d5fcb.
Issue with Jenkins builds
2014-09-17 18:11:41 -04:00
BlueWall
af286d5fcb Small changes to threading to send thread names to unmanaged threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects. 2014-09-17 17:56:10 -04:00
Justin Clark-Casey (justincc)
854dcd1abd Fix SmartThreadPool line endings in recent update from dos to unix 2013-05-01 23:00:46 +01:00
Justin Clark-Casey (justincc)
206fb306a7 Update SmartThreadPool to latest version 2.2.3 with a major and minor change.
SmartThreadPool code comes from http://www.codeproject.com/Articles/7933/Smart-Thread-Pool
This version implements thread abort (via WorkItem.Cancel(true)), threadpool naming, max thread stack, etc. so we no longer need to manually patch those.
However, two changes have been made to stock 2.2.3.
Major change: WorkItem.Cancel(bool abortExecution) in our version does not succeed if the work item was in progress and thread abort was not specified.
This is to match previous behaviour where we handle co-operative termination via another mechanism rather than checking WorkItem.IsCanceled.
Minor change: Did not add STP's StopWatch implementation as this is only used WinCE and Silverlight and causes a build clash with System.Diagnostics.StopWatch
The reason for updating is to see if this improves http://opensimulator.org/mantis/view.php?id=6557 and http://opensimulator.org/mantis/view.php?id=6586
2013-05-01 19:01:43 +01:00
Oren Hurvitz
b77da5039e Assign the SmartThreadPool name in the constructor
This is required because some threads are created in the constructor, so assigning the name afterwards would be too late.
2013-01-19 02:08:58 +00:00
John Hurliman
2f394b7e7e * Allow SmartThreadPool to be initialized without setting max stack size (like the original implementation)
* Only initialize Util's SmartThreadPool if it is actually being used
* No longer initializing Util's SmartThreadPool with a custom max stack size. From MSDN: "Avoid using this constructor overload. The default stack size used by the Thread(ThreadStart) constructor overload is the recommended stack size for threads."
2009-10-22 01:30:12 -07:00
Teravus Ovares
1a47ff8094 * This is Melanie's XEngine script engine. I've not tested this real well, however, it's confirmed to compile and OpenSimulator to run successfully without this script engine active. 2008-05-30 12:27:06 +00:00