[Red5] are there any synchronization (threading) issueswithred5?
Samuel Contesse
samuel.contesse at softcomponent.ch
Tue Nov 24 10:11:02 PST 2009
Everytime that the collection is accessed should be within a
synchronized block.
Sam
________________________________
From: red5-bounces at osflash.org [mailto:red5-bounces at osflash.org] On
Behalf Of Valentin Plamadeala
Sent: Tuesday, November 24, 2009 6:58 PM
To: red5 at osflash.org
Subject: Re: [Red5] are there any synchronization (threading)
issueswithred5?
if I have a list that is being accessed in the appConnect (items are
being added) and in the appDisconnect (items are being removed), is
this a critical section ?
do i have to synchronize this code ?
On Tue, Nov 24, 2009 at 7:50 PM, Andy Shaules <bowljoman at hotmail.com>
wrote:
well, you will have to identify critical sections and syncronized
access.
THe general calls will be synchronized but that doesnt mean you cant
write code that would break if you didnt syncronize access to something.
----- Original Message -----
From: Valentin Plamadeala <mailto:vnexster at gmail.com>
To: red5 at osflash.org
Sent: Tuesday, November 24, 2009 9:45 AM
Subject: Re: [Red5] are there any synchronization (threading)
issueswithred5 ?
i'm not using tomcat, i'm windows and red5 runs as a service :)
On Tue, Nov 24, 2009 at 7:36 PM, Andy Shaules
<bowljoman at hotmail.com> wrote:
Actually , I think tomcat will do most of it, but you should use
synchronized methods in crittical sections.
----- Original Message -----
From: Valentin Plamadeala <mailto:vnexster at gmail.com>
To: red5 at osflash.org
Sent: Tuesday, November 24, 2009 9:32 AM
Subject: Re: [Red5] are there any synchronization
(threading) issues withred5 ?
so i need to consider this synchronization issues, or
red5 is doing that for me, is it ?
On Tue, Nov 24, 2009 at 7:25 PM, Samuel Contesse
<samuel.contesse at softcomponent.ch> wrote:
Hello,
In this case you might use a synchronized collection as
described in Javadoc :
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#synch
ronizedCollection%28java.util.Collection%29
This method will return a thread safe collection.
Sam
________________________________
From: red5-bounces at osflash.org
[mailto:red5-bounces at osflash.org] On Behalf Of Valentin Plamadeala
Sent: Tuesday, November 24, 2009 4:53 PM
To: red5 at osflash.org
Subject: [Red5] are there any synchronization
(threading) issues with red5 ?
i have something like this:
public class Manager
{
public static Vector<Client>;
static
{
clients = new Vector<Client>();
}
public static void AddClient(Client client)
{
clients.Add(client);
}
}
and i call the Manager.AddClient in the appConnect
Method
am i going to have any problems with multiple threads or
something (if multiple users connect at the same time) ?
_______________________________________________
Red5 mailing list
Red5 at osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org
________________________________
_______________________________________________
Red5 mailing list
Red5 at osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org
_______________________________________________
Red5 mailing list
Red5 at osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org
________________________________
_______________________________________________
Red5 mailing list
Red5 at osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org
_______________________________________________
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/20091124/745585ab/attachment-0001.html>
More information about the Red5
mailing list