Commit Graph

40 Commits (371c9dd2af01a2e7422ec901ee1f80757284a78c)

Author SHA1 Message Date
UbitUmarov 371c9dd2af bad merge? 2015-09-01 14:54:35 +01:00
UbitUmarov 05d071a430 let BlockingQueue timeout work as its suposed to and not wait for ever 2014-07-24 05:37:56 +01:00
Justin Clark-Casey (justincc) 7df325c275 Extend locking in BlockingQueue to cover operations that are not guaranteed to be thread-safe 2014-03-18 23:05:49 +00:00
Diva Canto 71b1511db5 Revert "Revert "I confuse myself. Let's try this variable name instead.""
This reverts commit 52dc7b2a96.
2013-07-18 12:25:47 -07:00
Diva Canto a22a4db5ce Revert "Revert "Do the same trick that dahlia did for Dequeue(timeout)""
This reverts commit 5495df7443.
2013-07-18 12:25:22 -07:00
Diva Canto ad198a714c Revert "Revert "Didn't mean to commit this change in BlockingQueue.cs""
This reverts commit fda91d93da.
2013-07-18 12:24:43 -07:00
Diva Canto 9e35b069a4 Reverting the reverts I did yesterday. cpu-branch has now been
successfully tested, and I'm merging back those changes, which proved to
be good.
Revert "Revert "Cleared up much confusion in PollServiceRequestManager. Here's the history:""

This reverts commit fa2370b32e.
2013-07-18 12:23:27 -07:00
Diva Canto fa2370b32e Revert "Cleared up much confusion in PollServiceRequestManager. Here's the history:"
This reverts commit e46459ef21.
2013-07-17 15:05:36 -07:00
Diva Canto fda91d93da Revert "Didn't mean to commit this change in BlockingQueue.cs"
This reverts commit 0f5b616fb0.
2013-07-17 15:05:16 -07:00
Diva Canto 5495df7443 Revert "Do the same trick that dahlia did for Dequeue(timeout)"
This reverts commit af792bc7f2.
2013-07-17 15:04:12 -07:00
Diva Canto 52dc7b2a96 Revert "I confuse myself. Let's try this variable name instead."
This reverts commit 1d3deda10c.
2013-07-17 15:03:40 -07:00
Diva Canto 1d3deda10c I confuse myself. Let's try this variable name instead. 2013-07-17 13:26:15 -07:00
Diva Canto af792bc7f2 Do the same trick that dahlia did for Dequeue(timeout) 2013-07-17 13:23:29 -07:00
Diva Canto 0f5b616fb0 Didn't mean to commit this change in BlockingQueue.cs 2013-07-17 12:02:00 -07:00
Diva Canto e46459ef21 Cleared up much confusion in PollServiceRequestManager. Here's the history:
When Melanie added the web fetch inventory throttle to core, she made the long poll requests (EQs) effectively be handled on an active loop. All those requests, if they existed, were being constantly dequeued, checked for events (which most often they didn't have), and requeued again. This was an active loop thread on a 100ms cycle!
This fixes the issue. Now the inventory requests, if they aren't ready to be served, are placed directly back in the queue, but the long poll requests aren't placed there until there are events ready to be sent or timeout has been reached.
This puts the LongPollServiceWatcherThread back to 1sec cycle, as it was before.
2013-07-17 11:19:36 -07:00
Justin Clark-Casey (justincc) cbc3576ee2 minor: Add warning method doc about possibly inconsistent results returned from BlockingQueue.Contains(), Count() and GetQueueArray() 2013-07-16 23:14:53 +01:00
Justin Clark-Casey (justincc) 50b8ab60f2 Revert "Revert "MSDN documentation is unclear about whether exiting a lock() block will trigger a Monitor.Wait() to exit, so avoid some locks that don't actually affect the state of the internal queues in the BlockingQueue class.""
This reverts commit 21a09ad3ad.

After more analysis and discussion, it is apparant that the Count(), Contains() and GetQueueArray() cannot be made thread-safe anyway without external locking
And this change appears to have a positive impact on performance.
I still believe that Monitor.Exit() will not release any thread for Monitor.Wait(), as per http://msdn.microsoft.com/en-gb/library/vstudio/system.threading.monitor.exit%28v=vs.100%29.aspx
so this should in theory make no difference, though mono implementation issues could possibly be coming into play.
2013-07-16 23:00:07 +01:00
Justin Clark-Casey (justincc) 21a09ad3ad Revert "MSDN documentation is unclear about whether exiting a lock() block will trigger a Monitor.Wait() to exit, so avoid some locks that don't actually affect the state of the internal queues in the BlockingQueue class."
This reverts commit 42e2a0d66e

Reverting because unfortunately this introduces race conditions because Contains(), Count() and GetQueueArray() may now end up returning the wrong result if another thread performs a simultaneous update on m_queue.
Code such as PollServiceRequestManager.Stop() relies on the count being correct otherwise a request may be lost.
Also, though some of the internal queue methods do not affect state, they are not thread-safe and could return the wrong result generating the same problem
lock() generates Monitor.Enter() and Monitor.Exit() under the covers.  Monitor.Exit() does not cause Monitor.Wait() to exist, only Pulse() and PulseAll() will do this
Reverted with agreement.
2013-07-16 22:03:49 +01:00
dahlia 42e2a0d66e MSDN documentation is unclear about whether exiting a lock() block will trigger a Monitor.Wait() to exit, so avoid some locks that don't actually affect the state of the internal queues in the BlockingQueue class. 2013-07-16 01:12:56 -07:00
Jeff Ames 0d29614ca1 Formatting cleanup. 2009-10-19 08:58:03 +09:00
James J Greensky 44776fea72 Fixing LLClientView memory leak
Fixing LLClientView memory leak by disposing of all timers utilized
in LLClientView as they contain references to the callback method.
This required the use of the Terminate and Close infrastructure that
was already in place but was not being utilized.
2009-10-01 04:11:32 +01:00
Jeff Ames 840de6c036 Minor: Change OpenSim to OpenSimulator in older copyright headers and LICENSE.txt. 2009-06-01 06:37:14 +00:00
Justin Clarke Casey c04e7cdf2b * Support loading empty folders in an iar 2009-03-13 20:46:53 +00:00
Jeff Ames 8da726c3a8 Update svn properties. Add copyright headers. Minor formatting cleanup. 2008-11-09 01:31:38 +00:00
Adam Frisby fb2a1a6b7c * Fixed a major memory leak in packet processing - PacketQueue.Close is never called, causing the PacketQueue for dead clients to be preserved (including it's contents).
* This patch is highly experimental and may cause clients to not be able to connect, if this is the case, it will be rolled back in approximately 5 minutes.
2008-11-08 20:52:48 +00:00
Homer Horwitz 358bc41b03 - adding Dequeue with a timeout to the BlockingQueue 2008-09-27 18:29:17 +00:00
Jeff Ames 80d8e2889e Update svn properties. Formatting cleanup. Remove a compiler warning. 2008-07-23 13:24:25 +00:00
Melanie Thielker f112cebde2 Refactor the packet scheduling out of ClientView. Add intelligent
resending, timeouts, packet discarding. Add notification event for
packet discarding. Add priority scheduling for packet queues.
Add outgoing duplicate detection facility. Correct packet sequencing.
Make provisions for automatic server side throttle adjustments (comes
in next installment)
2008-07-22 17:58:42 +00:00
Adam Frisby 375163a6fe * Spring cleaning.
* Added new generic "Location" class to handle 2D integer locations. Going to use it to replace all RegionHandle and X,Y coordinate references throughout the entire project. You have been warned.
2008-04-29 14:04:55 +00:00
Sean Dague 2a2ef42e64 replace hard tabs with 4 spaces to be consistant in the source.
Please adjust your editors to not use hard tabs.
2008-04-24 12:27:24 +00:00
Sean Dague a3da86c6d7 Possible fix for the 100% CPU issue. I've not fully
confirmed that this fixes the issue, however functional
correctness of BlockingQueue requires that these locks be
put into place anyway.
2008-04-14 14:37:36 +00:00
Jeff Ames 47180080f0 Formatting cleanup. 2008-03-18 05:16:43 +00:00
Johan Berntsson 279e0061c5 Merged 3Di code that provides scene and avatar serialization, and plugin support for region move/split/merge. See ThirdParty/3Di/README.txt. Unless the new modules are used there should be no noticeable changes when running OpenSim. 2008-03-04 05:31:54 +00:00
Justin Clarke Casey 2dc94870aa Mostly debugging verbosity which I shall very shortly comment out.
Just want to try this out on windows quickly.
2008-02-09 00:14:34 +00:00
lbsa71 b95efbb689 * Added lock to Contains to avoid enumeration exceptions 2008-01-03 12:55:23 +00:00
lbsa71 4b4ee98070 * Trying to address TextureSender issues
* The BlockingQueue exposes Contains so we can make sure we don't add a TextureSender to the queue if there's already one present
* introduced some TryGetValue and various code convention stuff
2008-01-02 09:07:11 +00:00
lbsa71 efd90b56b7 * Optimized usings
* shortened references
* Removed redundant 'this'
* Normalized EOF
2007-12-27 21:41:48 +00:00
Justin Clarke Casey ed0f8bd572 minor refactor 2007-12-22 16:45:44 +00:00
Jeff Ames af6eb67999 saved OpenSim source code from the giant rampaging unterminated copyright notice of doom 2007-12-10 05:25:16 +00:00
lbsa71 064404ab40 * Moved OpenSim/Framework/General to OpenSim/Framework for great justice. 2007-10-31 07:28:23 +00:00