diff options
author | Justin Clark-Casey (justincc) | 2014-08-13 22:38:27 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-08-13 22:38:27 +0100 |
commit | 21176a3a901dd2190a1847acf576b938c0885e23 (patch) | |
tree | de76b08895632480f439bc026127126523c8ca93 /OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs | |
parent | Add 'server' stats information to pCampbot, as used elsewhere in OpenSimulator (diff) | |
download | opensim-SC_OLD-21176a3a901dd2190a1847acf576b938c0885e23.zip opensim-SC_OLD-21176a3a901dd2190a1847acf576b938c0885e23.tar.gz opensim-SC_OLD-21176a3a901dd2190a1847acf576b938c0885e23.tar.bz2 opensim-SC_OLD-21176a3a901dd2190a1847acf576b938c0885e23.tar.xz |
Terminate 'nothing' behaviour (and potentially others) by signalling using an event rather than polling connection state every 100ms
This kind of polling is very expensive with many bots/polling threads and appears to be the primary cause of bot falloff from the client end at higher loads.
Where inbound packet threads can't run in time due to contention and simulator disconnect timeout occurs.
Diffstat (limited to 'OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs')
-rw-r--r-- | OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs index 9a3075c..4a7237c 100644 --- a/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs +++ b/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs | |||
@@ -43,5 +43,15 @@ namespace pCampBot | |||
43 | AbbreviatedName = "n"; | 43 | AbbreviatedName = "n"; |
44 | Name = "None"; | 44 | Name = "None"; |
45 | } | 45 | } |
46 | |||
47 | public override void Action() | ||
48 | { | ||
49 | m_interruptEvent.WaitOne(); | ||
50 | } | ||
51 | |||
52 | public override void Interrupt() | ||
53 | { | ||
54 | m_interruptEvent.Set(); | ||
55 | } | ||
46 | } | 56 | } |
47 | } \ No newline at end of file | 57 | } \ No newline at end of file |