Running multiple queries simultaneously

"Wechsler, Steven" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <E67053DABCCDF4428BB7974550E1108F0108906E@DIRECTEFFECT.mtvn.ad.viacom.com>
Is there a way to do this with Sybperl without fork()ing separate
subprocesses?

I'd like to write a function that can take, say, a list of tables,
databases, or other objects, and perform a T-SQL function against each
(let's use update stats as an example). Since the function going against
each object is not dependent on any other function in the list, I'd like to
be able to run several of these in parallel to be able to take advantage of
SMP or a high performance SAN or what have you; when the first one completed
I'd take the next off the queue and continue until the queue was emptied.
Presumably I could do this with asynch I/O and n (where n is some integer >=
1) DB handles; however, the stumbling block is: if I have messages returned
(as opposed to a result set), how do I know which handle returned the
message without creating a distinct message handler for each handle?

Thanks,

Steve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.