HashMaps (like the one in ClientRegistry) require external
synchronization when used in a pervasively multithreaded environment.
On http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html I
read:

If multiple threads access this map concurrently, and at least one of
the threads modifies the map structurally, it must be synchronized
externally.

Yet I see no synchronization in ClientRegistry. Am I just being stupid
about something or should you guys have used a Hashtable instead?

Also, lookupClient can give unexpected behavior because of race
issues. Suppose the client is removed right after the call to
hasClient. Then clients.get will return null rather than throwing a
ClientNotFoundException.

Are you guys looking for more programmers, btw? I have an interest in
Red5 and I am holding a large part of the code in my head right now. I
would be interesting in contributing. Who do I contact?

Thanks,
Adam

-- 
[EMAIL PROTECTED]
312-375-9879

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to