I may be mistaken, but I believe that something as simple as calling a
javascript window.open function effectively starts a parallel process, i.e.
it is a non-blocking operation in a browser

heres the sample code i used to test it.

1. A frameset with 2 frames, A and B. frame A has src=test1.php 

2. test1.php

<script language='JavaScript'>                      
window.open('test2.php','B');                
</script>                                           
<?php                                               
                                                    
for ($i=0;$i<100000;$i++) { print $i . "<br>"; }    
                                                    
?>                       

2. test2.php

                           
<?php                                               
                                                    
for ($i=0;$i<100000;$i++) { print $i . "<br>"; }    
                                                    
?>                                                  
~                                                    

The programs definitely run concurrently, and a quick view of my apache
processes shows that 2 processes are being used by the program.

HTH

Mark



> -----Original Message-----
> From: Pedro M. S. Oliveira [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 6:02 PM
> To: PHP db
> Subject: [PHP-DB] runing a query and a another task at the same time
> 
> 
> hello all!
> i was wondering how to do a php script that works like this.
> 
> i need to make an update to a database but at the same time i 
> need to make a
> query to another database.
> the update and the query doesn't have anything to do with 
> each other, they
> just need to run both in a paralel way.
> i was wondering how to do this with php in a NT box, i can 
> also use a Linux
> box but the ultimate end i'll have to use NT (Grrrrrrr).
> 
> this may seam confuse but the thing i wanna do is like 
> paralel tasking,
> butting a function running on the background till its over and in the
> meanwhile another function that doesn't need the first 
> function to end to
> start..
> thank you all
> 
> 
> 
> 
> *******************************************
> Pedro Miguel Silva Oliveira
> Cell Phone: +351 96 5867227
> SMS: [EMAIL PROTECTED]
> Email: [EMAIL PROTECTED]
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to