What you show there will block for 60 seconds in the server's http
responding thread. I assume you don't want to do this, since if you
have, say 10 threads allocated to CF, all you have to do is hit this 10
times in separate browsers to bring the server to its knees.


If you want to make a thread sleep on its own, you need to spawn it off,
and sleep inside it's "run()" method, otherwise you're sleeping right in
your cf code....


-Dov
<mailto:[EMAIL PROTECTED]>  

  _____  

From: Matt Robertson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 5:23 PM
To: CF-Talk
Subject: Java sleep method ties up no resources?

In another thread it was mentioned that using

<cfset createObject('java','java.lang.Thread').sleep(60000)>

doesn't take up any extra cpu cycles and was a dandy way to insert a
waiting period (1 minute in this case) inside of a CF template with no
penalty to the CPU's use of processor cycles.

Is this also true with regard to CF's use of maximum simultaneous
requests?  Is the template I am running no longer tying up one of the
available requests until it wakes back up? or does it still count
towards the total of all running requests?  Seems like it would have
to count, but I don't know enough about the underlying architecture to
make an intelligent judgement.

--
--Matt Robertson--
MSB Designs, Inc.
mysecretbase.com
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to