Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fast demands gives err 500
#12
A quick and dirty way to implement it would be:

- Create a unit where you have a shared (global) variable which holds a TCriticalSection (let's name it HandlersCS).
- Create a TCriticalSection in unit initialization. Destroy it in unit finalization.
- In your TContentHandler.Execute() method do this:

HandlersCS.Enter;
try
// Do your thing here
finally
HandlersCS.Leave;
end;

All your current logic should be between Enter..Leave above.

This will effectively serialize all calls using that content handler class
Reply


Messages In This Thread
Fast demands gives err 500 - by ib elfving - 05-28-2019, 03:21 PM
RE: Fast demands gives err 500 - by DanBarclay - 05-29-2019, 01:06 AM
RE: Fast demands gives err 500 - by ib elfving - 06-03-2019, 03:53 AM
RE: Fast demands gives err 500 - by ib elfving - 06-03-2019, 12:29 PM
RE: Fast demands gives err 500 - by zsleo - 06-03-2019, 09:24 PM
RE: Fast demands gives err 500 - by joel - 06-04-2019, 01:29 AM
RE: Fast demands gives err 500 - by ib elfving - 06-04-2019, 03:00 AM
RE: Fast demands gives err 500 - by DanBarclay - 06-04-2019, 01:08 AM
RE: Fast demands gives err 500 - by Alexandre Machado - 06-04-2019, 03:48 AM
RE: Fast demands gives err 500 - by ib elfving - 06-04-2019, 05:22 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)