See in-line comments, On Wed, 2003-01-22 at 04:50, Nick Djurovich wrote:
> I thought of changing it such that 10 threads would be > created immediately, and then these threads would then > handle the connections as they came in. Indeed this is the way to go, the other method has a lot of overhead and doesn't give you any benefits. > > It's basically complaining that I cannot assign this > object instance to a scalar. When I use numbers on > the shared scalar, or enqueue, dequeue numbers on > the Queue it's no problem (just like the examples :). The bad news is that you are correct, only simple values can be passed. However, note that a reference is a scalar, and therefore references can be passed. This get's tricky as you need references to shared values though. > So basically all 10 threads are waiting to accept a > connection on the socket. I think it's okay, because > I basically wrote an email spammer and ran it in 3 > separate shells to bombard it with connections. I imagine it works because the underlying system calls will handle the accept from a single thread only. Which thread binded the socket? Alberto -- Alberto Alonso General Manager Global Gate Systems LLC. (512) 260-2523 http://www.ggsys.net Collocation, monitoring, remote backups and consulting solutions
