[Red5] using Thread.sleep in red5 app
Dominick Accattato
daccattato at gmail.com
Mon Jun 15 07:49:09 PDT 2009
If you place a Thread.sleep() in your service or in your application adapter
you will indeed pause the entire application. These run in the same
thread. The only time you can set a Thread.sleep() without it effecting
your entire application is if you spin off a new thread. Keep in mind that
if you use the scheduling service you will be spawning a new Thread. In
your scheduled job, you may set a sleep without affecting the rest of the
application. Hope this helps!
Dominick Accattato
CTO & Senior Engineer
www.infrared5.com
315.717.2818
On Mon, Jun 15, 2009 at 10:32 AM, Aljosa Mohorovic <
aljosa.mohorovic at gmail.com> wrote:
> if i register service in roomStart() like this:
>
> --------------------------------------------------------------------------------------
> @Override
> public boolean roomStart(IScope room) {
> MyService my_service = new MyService();
>
> String room_service = "room" + room.getName();
> room.registerServiceHandler(room_service, my_service);
> }
>
> --------------------------------------------------------------------------------------
>
> and then i call "Thread.sleep(3000);" somewhere in MyService class
> will this code "pause execution" only in MyService/room or will it
> pause entire app?
>
> Aljosa Mohorovic
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20090615/ad027f6a/attachment.html>
More information about the Red5
mailing list