mulithreading |
[eluser]unosoft[/eluser]
I am wondering if there was a way that we can load the view and then in the background do some other database inserts. For example: $this->load->view(’vquick’); $this->MTag->insertRecords(); --> I would like this insert to happen in a separate thread so that user does not have to wait for the insert to complete. Kumar p.s: Sorry...this is not a cross post. I posted this message in the Lounge forum accidentally earlier.
[eluser]esra[/eluser]
I believe that PHP has an optional or third-party module supporting apartment threading. Fairly sure about this but not positive. The problem of course is that the module needs to be installed on any server where your application is installed.
[eluser]Nanodeath[/eluser]
Could also use INSERT DELAYED if you're using MySQL. Quote:When a client uses INSERT DELAYED, it gets an okay from the server at once, and the row is queued to be inserted when the table is not in use by any other thread.
[eluser]bd3521[/eluser]
Is there anyway to implement $this->db->insert_delayed in CI? As long the table is MyISAM or Archive it should work by switching from INSERT to INSERT DELAYED |
Welcome Guest, Not a member yet? Register Sign In |